Branch Coverage

blib/lib/Mojolicious/Plugin/FeedReader.pm
Criterion Covered Total %
branch 77 92 83.7


line true false branch
37 9 16 if (not ref $xml) { }
11 5 elsif (ref $xml eq 'SCALAR') { }
1 4 elsif (&blessed($xml) and $xml->isa('Mojo::DOM')) { }
4 0 elsif (&blessed($xml) and $xml->can('slurp')) { }
39 0 9 unless $rss
55 0 24 unless $rss_str
61 4 21 if (&blessed($xml) and $xml->isa('Mojo::URL'))
63 1 3 if ($cb and ref $cb eq 'CODE') { }
70 1 0 if ($tx->success)
81 3 0 if ($tx->success) { }
86 0 0 $tx->error ? :
91 24 0 $dom ? :
96 0 25 unless $dom->isa('Mojo::DOM')
104 20 5 if (@$res)
119 94 306 if ($p)
121 14 80 if ($k eq 'author' and $p->at('name'))
124 17 77 if ($is_time_field{$k})
134 20 55 exists $info{$_} ? :
136 19 6 if $htmlUrl
137 18 7 if $description
151 19 181 if ($info{$old} and not $info{$new})
155 20 5 keys %info ? :
167 779 1431 if ($p)
172 5 7 if $p->tag =~ /\:/ and $k ne 'content\\:encoded' and $k ne 'xhtml\\:body' and $k ne 'dc\\:date' and $k ne 'dc\\:creator'
178 22 752 if ($k eq 'author' and $p->at('name'))
181 269 505 if ($is_time_field{$k})
191 130 7 if ($l->attr('href')) { }
192 122 8 if (not $l->attr('rel') or $l->attr('rel') eq 'alternate')
197 7 0 if ($l->text =~ /\w+/)
212 76 54 if (@tags)
232 126 1174 if ($h{$old} and not $h{$new})
238 8 382 if ($h{$fill} and not $h{$required})
252 3 10 ref $_[-1] eq 'CODE' ? :
258 1 12 unless $tx->success and $tx->res->code == 200
260 0 12 if ($@)
265 3 10 if ($cb) { }
289 2 10 if ($is_feed{$content_type}) { }
301 2 129 unless $attrs->{'rel'}
303 22 107 $attrs->{'type'} ? :
304 8 0 if ($is_feed{$type} and $rel{'alternate'} || $rel{'service.feed'})
311 374 0 if $_->attr('href')
319 5 5 unless (@feeds)
322 1 4 if ($self->parse_feed(\$body))
332 0 3 ref $opml_file ? :
338 40 922 if (not defined $node->{'xmlUrl'}) { }
351 0 920 unless $subscriptions{$rss}