blib/lib/Web/Scraper.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 29 | 44 | 65.9 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
56 | 38 | 3 | 0 | &blessed($stuff) and $stuff->isa('URI') |
38 | 0 | 3 | &blessed($stuff) and $stuff->isa('HTML::Element') | |
34 | 0 | 4 | ref $stuff and ref $stuff eq 'SCALAR' | |
139 | 0 | 0 | 3 | ref $key and ref $key eq 'CODE' |
161 | 37 | 17 | 0 | ref $val and ref $val eq 'CODE' |
51 | 0 | 3 | &blessed($val) and $val->isa('Web::Scraper') | |
168 | 4 | 0 | 5 | $uri and is_link_element($node, $val) |
231 | 6 | 1 | 6 | $retval =~ /^\d+$/ and $_ ne $value |
1 | 5 | 1 | defined $retval and not $retval |
line | l | !l | condition |
---|---|---|---|
242 | 5 | 0 | $HTML::Tagset::linkElements{$node->tag} || [] |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
30 | 0 | 0 | 0 | $UserAgent ||= 'LWP::UserAgent'->new('agent', 'Web::Scraper/' . $VERSION) |
82 | 3 | 38 | 0 | $tree ||= do { my $t = 'HTML::TreeBuilder::XPath'->new; $t->parse($html); $t } |
161 | 0 | 22 | 20 | lc $val eq 'content' or lc $val eq 'text' |
1 | 5 | 14 | lc $val eq 'raw' or lc $val eq 'html' | |
231 | 6 | 0 | 7 | $retval =~ /^\d+$/ and $_ ne $value or defined $retval and not $retval |