Branch Coverage

blib/lib/Dist/Zilla/Plugin/PkgVersion.pm
Criterion Covered Total %
branch 58 68 85.2


line true false branch
106 3 18 if $self->use_our
109 0 1 if ($self->use_package and $self->use_our || $self->use_begin)
123 1 49 if ($file->is_bytes)
128 0 49 if ($file->name =~ /\.pod$/u)
172 7 37 $self->use_our ? :
177 5 32 $self->use_our ? :
7 37 $self->use_begin ? :
188 0 49 unless version::is_lax($version)
194 4 45 unless ($package_stmts)
199 6 39 if ($self->document_assigns_to_variable($document, "\$VERSION"))
200 1 5 if ($self->die_on_existing_version)
213 1 46 if ($seen_pkg{$package}++)
218 2 44 if ($stmt->content =~ /package\s*(?:#.*)?\n\s*\Q$package\E/u)
223 0 44 if $package =~ /\P{ASCII}/u
226 0 44 if $version =~ /\P{ASCII}/u
229 6 38 if ($self->use_package)
230 2 4 if (my($block) = grep({$_->isa("PPI::Structure::Block");} $stmt->schildren))
243 1 1 unless ($stmt->version =~ /\{/u)
261 1 3 if (length $stmt->version)
273 0 3 if $self->zilla->is_trial
276 0 3 unless $stmt->parent->__replace_child($stmt, $newstmt)
286 7 31 if $self->zilla->is_trial
290 6 32 if ($version ne $clean_version)
306 4 40 if $munged
310 165 623 $line > $curr_line_number ? :
313 9 35 unless $find and @$find == 1
315 6 29 if ($find->[0]->isa("PPI::Token::Comment"))
320 28 1 if ("$find->[0]" =~ /\A\s*\z/u)
328 28 10 $blank ? :
333 28 10 if ($blank) { }
334 0 28 unless $blank->insert_after($bogus_token)
338 0 10 $self->die_on_line_insertion ? :
346 0 10 unless $stmt->insert_after($bogus_token)
357 37 2 if $munged