Condition Coverage

blib/lib/Mojolicious/Plugin/PubSubHubbub.pm
Criterion Covered Total %
condition 45 93 48.3


and 2 conditions

line l !l condition
786 0 26 $source = $s and last

and 3 conditions

line !l l&&!r l&&r condition
183 2 1 6 $c->param('hub.topic') and $c->param('hub.challenge')
3 2 4 $c->param('hub.topic') and $c->param('hub.challenge') and $c->param('hub.mode') =~ /^(?:un)?subscribe$/
244 0 4 0 $type and not $type =~ /$FEED_TYPE_RE/
283 5 8 0 $type and not $type =~ /$FEED_TYPE_RE/
288 0 0 13 $href and $rel
332 2 0 0 $link->{'short_type'} and not $topic->{'short_type'}
344 3 0 0 $link->{'short_type'} and not $hub->{'short_type'}
351 1 0 2 $topic and $hub
465 0 0 0 $topic and $hub
476 0 0 0 $topic and not $hub
505 0 0 0 $ntopic and $hub
554 2 1 5 exists $param{'topic'} and $param{'topic'} =~ m[^https?://]i
3 1 4 exists $param{'topic'} and $param{'topic'} =~ m[^https?://]i and exists $param{'hub'}
564 4 0 0 exists $param{'lease_seconds'} and $mode eq 'unsubscribe' || !($param{'lease_seconds'} =~ /^\d+$/)
576 10 0 10 exists $param{$_} and $param{$_}
737 0 0 0 not $self_href and $type eq 'rss'
791 13 13 0 do { $source->at('link[rel="self"][href]') } && do { return $dom }
872 0 0 7 $x_hub_on_behalf_of and $x_hub_on_behalf_of =~ s/^\s*(\d+)\s*$/$1/

or 2 conditions

line l !l condition
34 3 0 $param ||= {}
83 1 1 $param ||= 'cb'
223 1 0 $header_hash->{'Link'} // []
0 1 $header_hash->{'link'} // []
261 4 3 $links{$rel} //= []
310 8 5 $links{$rel} //= []
635 7 2 $c->req->headers->header('Content-Type') || 'unknown'
672 0 7 $x_hub_on_behalf_of ||= 1

or 3 conditions

line l !l&&r !l&&!r condition
137 2 0 1 @_ or not $plugin->hub
331 0 2 0 $topic ||= $link
343 0 3 0 $hub ||= $link
522 0 0 0 $nbase || $base
549 0 8 0 $param{'callback'} ||= $c->endpoint('pubsub-callback')
564 0 0 0 $mode eq 'unsubscribe' || !($param{'lease_seconds'} =~ /^\d+$/)
571 0 2 0 $param{'lease_seconds'} ||= $plugin->lease_seconds