Branch Coverage

blib/lib/PPI/App/ppi_version/BDFOY.pm
Criterion Covered Total %
branch 19 60 31.6


line true false branch
62 0 0 if (exists $commands{$args[0]}) { }
0 0 elsif (@args == 0) { }
87 0 0 if (defined $version) { }
0 0 elsif ($error) { }
140 0 0 if defined $version
155 0 2 unless $Document
160 470 30 unless $_[1]->isa('PPI::Token::Symbol')
161 28 2 unless $_[1]->content =~ /^\$(?:\w+::)*VERSION$/
164 1 1 if (my $sib = $_[1]->sprevious_sibling)
165 1 0 if $sib->content eq 'our'
170 0 1 unless my $equals = $_[1]->snext_sibling
171 0 1 unless $equals->isa('PPI::Token::Operator')
172 0 1 unless $equals->content eq '='
175 0 1 unless my $quote = $equals->snext_sibling
176 0 1 unless $quote->isa('PPI::Token::Quote')
179 0 1 unless my $next = $quote->snext_sibling
182 0 1 unless $next->isa('PPI::Token::Structure')
183 0 1 unless $next->content eq ';'
188 0 2 unless $elements
190 0 2 if (@$elements > 1)
198 0 2 unless defined $version_string
213 0 0 unless ($from and $from =~ /^v?[\d\._]+$/)
218 0 0 unless ($to and $to =~ /^v?[\d\._]+$/)
227 0 0 unless (-w $file)
234 0 0 if ($rv) { }
0 0 elsif (defined $rv) { }
264 0 0 unless ($document)
271 0 0 unless defined $rv
273 0 0 unless $rv
275 0 0 unless $document->save($file)