Branch Coverage

blib/lib/Dist/Zilla/Plugin/PkgVersion.pm
Criterion Covered Total %
branch 60 70 85.7


line true false branch
106 3 19 if $self->use_our
109 0 2 if ($self->use_package and $self->use_our || $self->use_begin)
123 1 54 if ($file->is_bytes)
128 0 54 if ($file->name =~ /\.pod$/u)
172 7 37 $self->use_our ? :
177 5 32 $self->use_our ? :
7 37 $self->use_begin ? :
188 0 54 unless version::is_lax($version)
194 4 50 unless ($package_stmts)
199 6 44 if ($self->document_assigns_to_variable($document, "\$VERSION"))
200 1 5 if ($self->die_on_existing_version)
213 1 52 if ($seen_pkg{$package}++)
218 2 50 if ($stmt->content =~ /package\s*(?:#.*)?\n\s*\Q$package\E/u)
223 0 50 if $package =~ /\P{ASCII}/u
226 0 50 if $version =~ /\P{ASCII}/u
229 12 38 if ($self->use_package)
230 6 6 $version =~ /\.\d+\./u ? :
235 4 8 if (my($block) = grep({$_->isa("PPI::Structure::Block");} $stmt->schildren))
248 2 2 unless ($stmt->version =~ /\{/u)
267 2 6 if (length $stmt->version)
279 0 6 if $self->zilla->is_trial
282 0 6 unless $stmt->parent->__replace_child($stmt, $newstmt)
292 7 31 if $self->zilla->is_trial
296 6 32 if ($version ne $clean_version)
312 4 40 if $munged
316 165 623 $line > $curr_line_number ? :
319 9 35 unless $find and @$find == 1
321 6 29 if ($find->[0]->isa("PPI::Token::Comment"))
326 28 1 if ("$find->[0]" =~ /\A\s*\z/u)
334 28 10 $blank ? :
339 28 10 if ($blank) { }
340 0 28 unless $blank->insert_after($bogus_token)
344 0 10 $self->die_on_line_insertion ? :
352 0 10 unless $stmt->insert_after($bogus_token)
363 40 4 if $munged