Condition Coverage

blib/lib/WWW/Scripter/Plugin/Ajax.pm
Criterion Covered Total %
condition 56 85 65.8


and 2 conditions

line l !l condition
195 127 43 defined $_ and utf8::encode($_)

and 3 conditions

line !l l&&!r l&&r condition
170 2 73 3 $url->can('userinfo') and defined(my $ui = $url->userinfo)
179 0 0 1 $url->can('userinfo') and defined(my $ui = $url->userinfo)
207 0 0 0 $_[0] =~ /[^\0-\xff]/ && ($_[0] = uri_escape_utf8($_[0], '^\\x00-\\x7f'))
224 1 0 106 defined $host1 && defined $host2
255 68 5 9 not $$self[2] =~ /^(?:get|head)\z/i and defined $data
354 76 0 2 $redirected and $res->code =~ /^3/
76 0 2 $redirected and $res->code =~ /^3/ and $async || ($error = 'HTML::DOM::Exception'->new(19, 'Infinite redirect')), 1
74 0 2 defined($error = $res->header('client-warning')) and $async || ($error = 'HTML::DOM::Exception'->new(19, $error)), 1
401 1 3 3 $$self[8] > 1 and $$self[8] < 4
506 1 5 0 $$self[12] and do { require WWW::Scripter::Plugin::Ajax::_xml_stuff; $$self[0]->plugin('JavaScript')->bind_classes(\%WWW::Scripter::Plugin::Ajax::_xml_interf) unless ${$$self[0]->plugin('Ajax');}++; $$self[11] = 'XML::DOM::Lite::Parser'->parse($$self[9]->content) }
571 0 66 0 defined blessed($_) && $_->can('handleEvent')
574 0 0 0 $eh and &$eh()

or 2 conditions

line l !l condition
217 0 1 $error_code || 9
224 2 4 $error_code || 18
227 0 0 $error_code || 18
231 0 1 $error_code || 18
242 58 24 $$self[1] ||= bless($$self[0]->clone, 'LWP::UserAgent')
386 6 67 ($res->content_type || '') =~ m[(?:^(?:application|text)/xml|\+xml)\z] || undef
413 3 6 (shift())->[9] || (return '')
421 1 3 (shift())->[9] || (return)
475 1 7 (shift())->[10] ||= []
496 76 2 $_[0][9] || (return '')

or 3 conditions

line l !l&&r !l&&!r condition
224 1 5 101 not defined $host1 && defined $host2 or $host1 ne $host2
251 21 0 61 defined $$self[5] or defined $$self[6]
283 0 1 0 our $xml_dom_lite_cereal ||= (require XML::DOM::Lite, 'XML::DOM::Lite::Serializer'->new)
301 1 6 0 $request->content_type || $default_mime
354 1 1 0 $async || ($error = 'HTML::DOM::Exception'->new(19, 'Infinite redirect'))
2 0 78 $error or $redirected and $res->code =~ /^3/ and $async || ($error = 'HTML::DOM::Exception'->new(19, 'Infinite redirect')), 1
1 1 0 $async || ($error = 'HTML::DOM::Exception'->new(19, $error))
2 0 76 $error or $redirected and $res->code =~ /^3/ and $async || ($error = 'HTML::DOM::Exception'->new(19, 'Infinite redirect')), 1 or defined($error = $res->header('client-warning')) and $async || ($error = 'HTML::DOM::Exception'->new(19, $error)), 1
574 66 0 0 eval { do { defined blessed($_) && $_->can('handleEvent') ? $_->handleEvent($event) : &$_($event); 1 } } or $eh and &$eh()