Branch Coverage

blib/lib/CPAN/Tarzip.pm
Criterion Covered Total %
branch 47 180 26.1


line true false branch
16 0 39 unless defined $file
18 29 10 if ($file =~ /\.(bz2|gz|zip|tbz|tgz)$/i) { }
23 0 39 if (do { $file =~ /\.(?:bz2|tbz)$/i }) { }
25 0 0 unless ($me->{'UNGZIPPRG'} = $CPAN::Config->{'bzip2'})
27 0 0 if ($bzip2) { }
45 0 58 unless $CPAN::META->has_inst("Compress::Zlib")
51 0 78 if ($CPAN::Config->{$what})
54 78 0 if ($CPAN::META->has_inst("File::Which"))
58 0 0 if @cand
62 0 0 unless defined $component and $component
64 0 0 if ("MM"->maybe_command($abs))
74 0 0 if (&_zlib_ok()) { }
76 0 0 unless $fhw = "FileHandle"->new($read)
79 0 0 unless my $gz = Compress::Zlib::gzopen($write, "wb")
97 0 0 if (&_zlib_ok()) { }
99 0 0 unless $fhw = "FileHandle"->new(">$write")
101 0 0 unless my $gz = Compress::Zlib::gzopen($read, "rb")
106 0 0 if $gz->gzerror != Compress::Zlib::Z_STREAM_END()
120 7 39 if exists $self->{'GTEST'}
121 0 39 unless defined $self->{'FILE'}
124 0 39 if ($read =~ /\.(?:bz2|tbz)$/ and $CPAN::META->has_inst('Compress::Bzip2')) { }
29 10 elsif ($read =~ /\.(?:gz|tgz)$/ and &_zlib_ok()) { }
10 0 elsif (not $self->{'ISCOMPRESSED'}) { }
127 0 0 unless my $gz = Compress::Bzip2::bzopen($read, "rb")
137 0 0 if ($len == -s $read)
139 0 0 if $CPAN::DEBUG
142 0 0 if $CPAN::DEBUG
148 0 29 unless my $gz = Compress::Zlib::gzopen($read, "rb")
158 0 29 if ($len == -s $read)
160 0 0 if $CPAN::DEBUG
163 0 29 if $CPAN::DEBUG
179 10 21 if (do { not $self->gtest }) { }
0 21 elsif ($file =~ /\.(?:bz2|tbz)$/ and $CPAN::META->has_inst('Compress::Bzip2')) { }
21 0 elsif ($file =~ /\.(?:gz|tgz)$/ and &_zlib_ok()) { }
181 0 10 unless my $fh = "FileHandle"->new($file)
187 0 0 unless my $gz = Compress::Bzip2::bzopen($file, "rb")
192 0 21 unless my $gz = Compress::Zlib::gzopen($file, "rb")
199 0 0 unless my $fh = "FileHandle"->new($pipe)
210 14 3 if (exists $self->{'GZ'}) { }
214 7 7 if $bytesread <= 0
225 0 32 if defined $offset
226 14 18 if (exists $self->{'GZ'}) { }
239 21 18 if (exists $self->{'GZ'}) { }
241 21 0 if defined $gz
245 10 8 if defined $fh
256 0 8 if $exttar =~ /^\s+$/
258 0 8 if $extgzip =~ /^\s+$/
260 0 8 if (do { $CPAN::Tarzip::BUGHUNTING }) { }
0 8 elsif ($CPAN::Config->{'prefer_external_tar'}) { }
8 0 elsif ($CPAN::META->has_usable('Archive::Tar') and &_zlib_ok()) { }
0 0 elsif ($exttar and $extgzip) { }
270 8 0 unless (defined $prefer_external_tar)
271 0 8 if ($^O =~ /(MSWin32|solaris)/) { }
277 8 0 $prefer_external_tar ? :
282 0 0 if ($^O eq "solaris" and not `$exttar --version 2>/dev/null` =~ /gnu/i)
293 0 0 $exttar ? :
294 0 0 $foundtar ? :
0 0 $extgzip ? :
296 0 0 if ($CPAN::META->has_usable('Archive::Tar')) { }
302 0 0 if (&_zlib_ok()) { }
0 0 elsif ($foundAT) { }
322 0 8 if (defined $CPAN::Config->{'tar_verbosity'})
324 0 0 $CPAN::Config->{'tar_verbosity'} eq 'none' ? :
326 8 0 if ($prefer == 1) { }
0 0 elsif ($prefer == 2) { }
330 8 0 if ($is_compressed) { }
337 0 8 if (system($system) != 0) { }
340 0 0 if ($is_compressed)
344 0 0 if ($ct->gunzip($ungzf)) { }
354 0 0 if ($ret == 0) { }
357 0 0 if ($? == -1) { }
0 0 elsif ($? & 127) { }
361 0 0 $? & 128 ? :
373 0 0 unless ($CPAN::META->has_usable("Archive::Tar"))
385 0 0 if ($CPAN::Tarzip::BUGHUNTING) { }
393 0 0 if ($af =~ m[^(/|\.\./)])
399 0 0 if $CPAN::Signal
403 0 0 if ($af =~ m[^(/|\.\./)])
407 0 0 if ($tar_verb eq "v" or $tar_verb eq "vv")
411 0 0 if $CPAN::Signal
413 0 0 unless $tar->extract(@af)
417 0 0 if $^O eq "MacOS"
427 0 0 if ($CPAN::META->has_inst('Archive::Zip')) { }
0 0 elsif (my $unzip = $CPAN::Config->{'unzip'}) { }
432 0 0 if $status != Archive::Zip::AZ_OK()
434 0 0 if $CPAN::DEBUG
438 0 0 if ($af =~ m[^(/|\.\./)])
443 0 0 if $CPAN::DEBUG
444 0 0 if $status != Archive::Zip::AZ_OK()
446 0 0 if $CPAN::Signal