Branch Coverage

blib/lib/PPI/App/ppi_version.pm
Criterion Covered Total %
branch 33 90 36.6


line true false branch
27 0 0 unless defined $cmd
28 0 0 if $cmd eq 'show'
29 0 0 if $cmd eq 'change'
68 0 0 unless ($document)
75 0 0 unless ($elements)
79 0 0 if (@$elements > 1)
85 0 0 unless (defined $version)
99 0 0 unless ($from and $from =~ /^[\d\._]+$/)
103 0 0 unless ($to and $to =~ /^[\d\._]+$/)
114 0 0 unless (-w $file)
119 0 0 if ($rv) { }
0 0 elsif (defined $rv) { }
149 0 0 unless ($document)
155 0 0 unless (defined $rv)
158 0 0 unless ($rv)
163 0 0 unless ($document->save($file))
177 0 10 unless ($elements)
180 0 10 if (@$elements > 1)
186 0 10 unless ($version eq $from)
199 24 6 if ($token->isa('PPI::Token::Quote')) { }
6 0 elsif ($token->isa('PPI::Token::Number')) { }
200 12 12 if ($token->can('literal')) { }
206 6 0 if ($token->can('literal')) { }
221 2 8 if ($token->isa('PPI::Token::Number')) { }
2 6 elsif ($token->isa('PPI::Token::Quote::Single')) { }
2 4 elsif ($token->isa('PPI::Token::Quote::Double')) { }
2 2 elsif ($token->isa('PPI::Token::Quote::Literal')) { }
2 0 elsif ($token->isa('PPI::Token::Quote::Interpolate')) { }
250 0 0 unless ($doc)
256 0 0 unless ($elements)
259 0 0 if (@$elements > 1)
265 0 0 unless (defined $version_string)
275 330 20 unless $_[1]->isa('PPI::Token::Quote') or $_[1]->isa('PPI::Token::Number')
280 20 0 if ($t)
281 0 20 unless $t->isa('PPI::Token::Structure')
282 0 20 unless $t->content eq ';'
286 0 20 unless my $e = $_[1]->sprevious_sibling
287 0 20 unless $e->isa('PPI::Token::Operator')
288 0 20 unless $e->content eq '='
291 0 20 unless my $v = $e->sprevious_sibling
292 0 20 unless $v->isa('PPI::Token::Symbol')
293 0 20 unless $v->content =~ /^\$(?:\w+::)*VERSION$/
297 10 10 if ($o)
298 0 10 unless $o->content eq 'our'
299 0 10 if $o->sprevious_sibling