Branch Coverage

blib/lib/WWW/Crawler/Lite.pm
Criterion Covered Total %
branch 28 52 53.8


line true false branch
61 0 4 @_ ? :
68 0 0 @_ ? :
75 0 4 @_ ? :
82 0 617 @_ ? :
90 0 654 @_ ? :
98 0 8 @_ ? :
114 0 1 unless $args{'url'}
119 0 5 unless my($type) = split(/\;/, $response->header('content-type') || '', 2)
121 0 5 unless grep {$type =~ /\Q$_\E/i;} $s->http_accept
134 1 0 if $res and $res->is_success and $res->content
137 0 1 if $@
146 1 3 unless $s->is_running
153 3 0 if grep {$type =~ /\Q$_\E/i;} $s->http_accept
164 0 4 unless ($url) = grep({$s->rules->allowed($_);} grep({$$s{'urls'}{$_} eq 'new';} keys %{$$s{'urls'};}))
179 0 4 if ($s->link_parser eq 'HTML::LinkExtor') { }
4 0 elsif ($s->link_parser eq 'default') { }
185 0 0 unless uc $tag eq 'A'
186 0 0 if ($s->follow_ok->($attrs{'href'}))
202 13 641 if ($anchortext =~ /
206 9 4 if $alt
209 654 0 if (my($quote) = $href =~ /^(['"])/) { }
217 0 654 unless defined $href
219 654 0 if ($href)
222 654 0 if ($s->follow_ok->($new))
248 594 60 if /$pattern/ and not exists $$s{'urls'}{$u}
264 617 37 if $$u{'href'} =~ /$pattern/