Branch Coverage

blib/lib/CPAN/Mirror/Tiny.pm
Criterion Covered Total %
branch 0 130 0.0


line true false branch
35 0 0 $outfile ? :
40 0 0 unless my $base = $option{'base'} || $ENV{'PERL_CPAN_MIRROR_TINY_BASE'}
42 0 0 unless -d $base
57 0 0 unless $self->{$cmd} = File::Which::which($cmd)
71 0 0 unless @path
85 0 0 unless -d $dir
89 0 0 -f $dest ? :
98 0 0 if ($url =~ s[^file://][]u or -e $url) { }
0 0 elsif ($url =~ /(?:^git|\.git(?:@(.+))?$)/u or &$maybe_git($url)) { }
0 0 elsif ($url =~ /^cpan:(.+)/u) { }
0 0 elsif ($url =~ /^https?:/u) { }
118 0 0 if $version
120 0 0 unless $res->{'success'}
122 0 0 if ($@) { }
130 0 0 if (-f $arg) { }
0 0 elsif (-d $arg) { }
140 0 0 unless -f $file
141 0 0 unless $file =~ /(?:\.tgz|\.tar\.gz|\.tar\.bz2|\.zip)$/u
150 0 0 unless -f $metafile
155 0 0 if -d $distvname
156 0 0 unless File::Copy::Recursive::dircopy($dir, $distvname)
158 0 0 unless $exit == 0
164 0 0 unless ($url =~ /(?:\.tgz|\.tar\.gz|\.tar\.bz2|\.zip)$/u)
171 0 0 if ($res->{'success'}) { }
173 0 0 unless ($author)
174 0 0 if ($url =~ m[/authors/id/./../([^/]+)/]u) { }
190 0 0 if ($package =~ s/@(.+)$//u)
194 0 0 if $err
201 0 0 if ($url =~ /(.*)\@(.*)$/u)
205 0 0 if ($exit == 0)
213 0 0 unless $exit == 0
214 0 0 if ($ref)
216 0 0 unless $exit == 0
219 0 0 unless -f $metafile
228 0 0 if $exit != 0
231 0 0 if ($exit == 0 and -f "$distvname.tar.gz") { }
240 0 0 unless -f $path
242 0 0 unless -d $cache_dir
245 0 0 unless open my $fh, "<", $path
248 0 0 if (-f $cache_file)
249 0 0 unless open my $fh, "<", $cache_file
251 0 0 if (($cache->{'version'} || 0) == $CACHE_VERSION) { }
258 0 0 if ($result)
259 0 0 unless open my $fh, ">", $cache_file
274 0 0 unless my $dir = $self->extract($path)
276 0 0 unless $parser->parse($dir)
281 0 0 $option{'compress'} ? :
288 0 0 unless -d $base
293 0 0 unless -f $_
294 0 0 unless /(?:\.tgz|\.tar\.gz|\.tar\.bz2|\.zip)$/u
308 0 0 if ($option{'show_progress'})
320 0 0 unless defined $version
329 0 0 unless -d $dir
330 0 0 unless open my $fh, ">", "$file.tmp"
334 0 0 if ($option{'compress'}) { }
337 0 0 if ($exit == 0) { }
338 0 0 unless rename "$file.gz.tmp", "$file.gz"
347 0 0 unless rename "$file.tmp", $file
359 0 0 unless exists $info->{$module}{'version'}
361 0 0 unless ($packages->{$module})
367 0 0 if ('Parse::PMFile'->_vgt($new_version, $cur_version)) { }
0 0 elsif ('Parse::PMFile'->_vgt($cur_version, $new_version)) { }
375 0 0 if ($new_version eq "undef" or $new_version == 0 or "Parse::PMFile"->_vcmp($new_version, $cur_version) == 0)
379 0 0 if ($mtime >= $packages->{$module}[2])
384 0 0 if ($ok)