Branch Coverage

blib/lib/CPAN/Checksums.pm
Criterion Covered Total %
branch 47 102 46.0


line true false branch
47 0 6 unless $dh->open($dirname)
50 12 40 if $de =~ /^\./
51 5 35 if substr($de, 0, 9) eq 'CHECKSUMS'
52 0 35 if $CPAN::Checksums::IGNORE_MATCH and $de =~ /$CPAN::Checksums::IGNORE_MATCH/
60 0 35 if ($CPAN::Checksums::TRY_SHORTNAME)
65 0 0 if length $suffix > 3
67 0 0 if ($shortname =~ /\-/) { }
78 0 0 if length $p[0] > $counter
79 0 0 if length $p[1] > $counter--
81 0 0 $suffix ? :
87 0 0 if (++$counter > 1000)
99 0 35 if (-l 'File::Spec'->catdir($dirname, $de))
107 0 35 if (-d 'File::Spec'->catdir($dirname, $de)) { }
110 0 35 unless my(@stat) = stat $abs
119 35 0 if (not exists $old_dref->{$de}{$param} or $dref->{$de}{$param} ne $old_dref->{$de}{$param})
125 0 0 if ($can_reuse_old_md5 and $de =~ /\.(gz|tgz|bz2|tbz)$/ and exists $old_dref->{$de}{'md5'} and not exists $old_dref->{$de}{'md5-ungz'} and not exists $old_dref->{$de}{'md5-unbz2'})
133 0 35 if ($can_reuse_old_md5) { }
135 0 0 unless exists $old_dref->{$de}{$param}
153 5 1 if ($fh->open($ckfn))
156 5 248 if /^\#/
157 0 248 if /SIGNED MESSAGE/
176 5 1 if ($old_ddump)
178 5 0 if (!!$CPAN::Checksums::SIGNING_KEY == !!$is_signed)
179 5 0 if (not $CPAN::Checksums::MIN_MTIME_CHECKSUMS or $ckfnstat[9] > $CPAN::Checksums::MIN_MTIME_CHECKSUMS)
181 2 3 if $old_ddump eq $ddump
182 0 3 if &ckcmp($old_dref, $dref)
185 1 2 if ($CPAN::Checksums::CAUTION)
187 0 1 if $report
190 0 4 unless my $ft = 'File::Temp'->new('DIR', $dirname, 'TEMPLATE', 'CHECKSUMS.XXXX', 'CLEANUP', 0)
198 0 4 unless open $fh, ">$tckfn\000"
201 0 4 if ($CPAN::Checksums::SIGNING_KEY)
204 0 0 unless open $fh, "| $CPAN::Checksums::SIGNING_PROGRAM $CPAN::Checksums::SIGNING_KEY >> $tckfn"
213 0 4 if ($CPAN::Checksums::SIGNING_KEY and not $success)
216 0 0 unless open $fh, ">$tckfn\000"
218 0 0 unless close $fh
220 3 1 if -f $ckfn
221 0 4 unless rename $tckfn, $ckfn
222 0 4 unless chmod 0444, $ckfn
230 0 70 unless $fh->open("$abs\000")
239 10 60 if ($de =~ /\.(gz|tgz)$/) { }
10 50 elsif ($de =~ /\.(bz2|tbz)$/) { }
241 0 0 if (exists $old_dref->{$de}{$keyname} and $dref->{$de}{$keyname} eq $old_dref->{$de}{$keyname} and exists $old_dref->{$de}{"$keyname-ungz"})
248 10 0 if ($zip = &Compress::Zlib::gzopen($abs, 'rb'))
256 0 0 if (exists $old_dref->{$de}{$keyname} and $dref->{$de}{$keyname} eq $old_dref->{$de}{$keyname} and exists $old_dref->{$de}{"$keyname-unbz2"})
263 10 0 if ($zip = &Compress::Bzip2::bzopen($abs, 'rb'))
288 7 0 if (exists $old->{$dist})
292 42 0 unless exists $old->{$dist}{$diff} and exists $new->{$dist}{$diff}
293 0 0 if $old->{$dist}{$diff} eq $new->{$dist}{$diff}
294 0 0 unless $headersaid++
308 6 8 unless (ref $_ eq 'HASH')
313 0 6 if $@