Branch Coverage

blib/lib/Dist/Mgr.pm
Criterion Covered Total %
branch 171 232 73.7


line true false branch
75 0 25 $^O =~ /win32/i ? :
92 2 4 unless (defined $author and defined $repo)
103 2 4 unless (defined $author and defined $repo)
114 0 2 unless defined $module
124 2 0 if (-e $file)
129 2 0 unless (-e $file and $changes_date_count)
139 0 1 unless defined $version
147 1 2 if ($contents->[$_] =~ /^\d+\.\d+\s+/)
166 1 0 if length $m == 1
167 0 1 if length $d == 1
170 1 2 if ($contents->[$_] =~ /^(.*)\s+UNREL/)
179 2 7 if (scalar @_ < 2)
190 2 5 if _module_insert_ci_badges($author, $repo, $_) == -1
198 3 6 if (defined $os and ref $os ne "ARRAY")
204 5 1 if (-e 'MANIFEST.SKIP') { }
205 0 5 unless open my $fh, "<", "MANIFEST.SKIP"
210 5 0 if (grep((!/\.github$/), @makefile_skip_contents))
212 0 5 unless open my $wfh, ">>", "MANIFEST.SKIP"
219 0 1 unless open my $wfh, ">>", "MANIFEST.SKIP"
233 1 20 if (not defined $args) { }
1 19 elsif (ref $args ne 'HASH') { }
240 17 2 unless defined $file
243 15 4 if (-e $file and -f $file) { }
246 0 15 unless open my $fh, "<", $file
251 24 7 if $conf->{$_} eq ""
262 15 4 if $conf
267 0 20 $^O =~ /win32/i ? :
289 2 127 if ($contents->[$_] =~ /^(Copyright\s+)\d{4}(\s+.*)/)
313 4 2 unless defined $copyright and $copyright =~ /^\d{4}$/
314 2 0 if defined $copyright
324 1 4 unless (defined $dist_file_name)
328 1 3 unless (-f $dist_file_name)
335 2 1 unless $args{'user'}
336 2 1 unless $args{'password'}
338 2 1 unless ($args{'user'} and $args{'password'})
342 1 0 if ($args{'dry_run'})
400 1 7 if ($cwd =~ _dist_dir_re())
404 4 3 unless exists $args{'license'}
408 3 15 unless (exists $args{$_})
413 1 3 if (ref $args{'modules'} ne "ARRAY")
417 2 1 if ($args{'verbose'}) { }
435 0 3 unless chdir $module_dir
437 0 3 unless unlink $module_file
442 0 3 unless chdir ".."
469 1 3 unless (defined $module)
476 1 2 unless my(@move_count) = rmove_glob("$module_dir/*", ".")
486 1 47 if ($inner->[$_] != $dist_count->[$outer_idx][$inner_idx][$_])
493 0 1 unless rmtree($module_dir)
508 0 0 $verbose ? :
510 0 0 if ($? != 0)
520 0 3 $verbose ? :
522 0 3 if ($? != 0)
531 0 3 if ($verbose) { }
532 0 0 if (-f "MANIFEST")
533 0 0 unless unlink "MANIFEST"
541 1 2 if (-f "MANIFEST")
542 0 1 unless unlink "MANIFEST"
550 0 3 if ($? != 0)
559 0 0 if ($verbose)
568 0 0 if ($? != 0)
579 5 9 if (defined $version and $version =~ /^-/)
599 3 20 unless (defined $version_line)
603 3 17 unless (defined $current_version)
607 1 16 if ("version"->parse($current_version) >= "version"->parse($version))
616 0 16 unless open my $wfh, ">", \$mem_file
621 16 479 if ($line eq $version_line)
639 5 11 unless ($dry_run)
649 1 502 unless defined $version
681 0 4 unless defined $changes
691 0 2 unless open my $fh, ">", $file
709 1 6 if (ref $contents ne "ARRAY")
715 2 4 unless -d ".github/workflows/"
717 0 6 unless open my $fh, ">", $ci_file
727 0 4 if (ref $contents ne "HASH")
735 0 4 unless open my $fh, ">", $file
766 0 2 unless open my $fh, ">", "$dir/.gitignore"
781 0 8 unless defined $mf
791 0 6 unless defined $mf
794 2 4 if grep /META_MERGE/, @$mf
797 4 47 if ($mf->[$_] =~ /MIN_PERL_VERSION/)
808 1 4 unless (defined $makefile)
814 1 3 if grep /bugtracker/, @$mf
816 3 0 if (grep((!/META_MERGE/), @$mf))
821 3 44 if ($mf->[$_] =~ /resources => \{/)
835 1 4 unless (defined $makefile)
841 1 3 if grep /repository/, @$mf
843 3 0 if (grep((!/META_MERGE/), @$mf))
848 3 44 if ($mf->[$_] =~ /resources => \{/)
865 0 2 unless open my $fh, ">", "$dir/MANIFEST.SKIP"
878 0 2 unless open my $fh, ">", "$dir/manifest.t"
897 33 5 if (defined $version_line) { }
899 33 0 if ($version_line =~ /=(.*)$/)
908 5 28 unless (defined eval { do { "version"->parse($ver); 1 } })
930 53 3209 if $_[1]->isa("PPI::Statement::Variable")
935 8 53 if ref $token ne "ARRAY"
946 0 23 unless open my $fh, "<", $file
960 1 20 if (defined $module) { }
980 2 5 if grep /badge\.svg/, @$mf
983 3 65 if ($mf->[$_] =~ /^=head1 NAME/)
996 0 7 unless defined $mod_file
1006 0 5 unless open my $wfh, ">", $module_file
1010 0 5 unless close $wfh
1017 1 6 unless (defined $module_file)
1021 2 3 unless (defined $module and defined $author and defined $email)
1027 0 3 unless open my $wfh, ">", $module_file
1041 6 0 if (defined $copyright_line) { }
1042 2 4 if ($copyright_line =~ /^Copyright\s+(\d{4})\s+\w+/)
1056 0 6 unless open my $fh, "<", $pod_file
1059 2 127 if (/^Copyright\s+\d{4}\s+\w+/)
1079 0 6 unless defined $pod_file
1095 0 0 $^O =~ /win32/i ? :
1103 0 18 unless defined $fs_entry
1105 9 9 if -d $fs_entry
1106 6 3 if -f $fs_entry
1115 2 515 unless defined $version
1117 3 512 if (not defined eval { do { "version"->parse($version); 1 } })