Branch Coverage

blib/lib/Bootylicious/Plugin/Pingback.pm
Criterion Covered Total %
branch 30 32 93.7


line true false branch
22 11 6 unless $c->req->method =~ /GET|HEAD/
24 2 4 unless $c->res->code and $c->res->code == 200
26 4 0 unless $c->match->endpoint->name eq 'article'
38 5 7 unless $source_uri and $target_uri
40 1 6 unless $target_uri =~ m[^/articles/(\d+)/(\d+)/(.*)]
47 1 5 unless $article
57 1 4 unless $tx->res->code and $tx->res->code == 200
60 1 3 unless $tx->res->body =~ /\Q$target_uri\E/
63 2 1 if $article->has_pingback($source_uri)
76 1 11 unless $self->req->method eq 'POST' and $self->req->body
82 1 10 unless $method
85 1 9 unless $method_name->text eq 'pingback.ping'
89 1 8 unless $source_uri and $target_uri
95 1 7 unless $target_uri =~ s/^\Q$url\E//
97 7 0 unless $target_uri =~ m[^/]
145 5 6 unless $code