Branch Coverage

blib/lib/CPAN/Tarzip.pm
Criterion Covered Total %
branch 36 180 20.0


line true false branch
16 0 4 unless defined $file
18 1 3 if ($file =~ /\.(bz2|gz|zip|tbz|tgz)$/i) { }
23 0 4 if (do { $file =~ /\.(?:bz2|tbz)$/i }) { }
25 0 0 unless ($me->{'UNGZIPPRG'} = $CPAN::Config->{'bzip2'})
27 0 0 if ($bzip2) { }
45 0 2 unless $CPAN::META->has_inst('Compress::Zlib')
51 0 8 if ($CPAN::Config->{$what})
54 8 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 0 4 if exists $self->{'GTEST'}
121 0 4 unless defined $self->{'FILE'}
124 0 4 if ($read =~ /\.(?:bz2|tbz)$/ and $CPAN::META->has_inst('Compress::Bzip2')) { }
1 3 elsif ($read =~ /\.(?:gz|tgz)$/ and &_zlib_ok()) { }
3 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 1 unless my $gz = Compress::Zlib::gzopen($read, 'rb')
158 0 1 if ($len == -s $read)
160 0 0 if $CPAN::DEBUG
163 0 1 if $CPAN::DEBUG
179 3 0 if (do { not $self->gtest }) { }
0 0 elsif ($file =~ /\.(?:bz2|tbz)$/ and $CPAN::META->has_inst('Compress::Bzip2')) { }
0 0 elsif ($file =~ /\.(?:gz|tgz)$/ and &_zlib_ok()) { }
181 0 3 unless my $fh = 'FileHandle'->new($file)
187 0 0 unless my $gz = Compress::Bzip2::bzopen($file, 'rb')
192 0 0 unless my $gz = Compress::Zlib::gzopen($file, 'rb')
199 0 0 unless my $fh = 'FileHandle'->new($pipe)
210 0 3 if (exists $self->{'GZ'}) { }
214 0 0 if $bytesread <= 0
225 0 4 if defined $offset
226 0 4 if (exists $self->{'GZ'}) { }
239 0 4 if (exists $self->{'GZ'}) { }
241 0 0 if defined $gz
245 3 1 if defined $fh
256 0 1 if $exttar =~ /^\s+$/
258 0 1 if $extgzip =~ /^\s+$/
260 0 1 if (do { $CPAN::Tarzip::BUGHUNTING }) { }
0 1 elsif ($CPAN::Config->{'prefer_external_tar'}) { }
1 0 elsif ($CPAN::META->has_usable('Archive::Tar') and &_zlib_ok()) { }
0 0 elsif ($exttar and $extgzip) { }
270 1 0 unless (defined $prefer_external_tar)
271 0 1 if ($^O =~ /(MSWin32|solaris)/) { }
277 1 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 1 if (defined $CPAN::Config->{'tar_verbosity'})
324 0 0 $CPAN::Config->{'tar_verbosity'} eq 'none' ? :
326 1 0 if ($prefer == 1) { }
0 0 elsif ($prefer == 2) { }
330 1 0 if ($is_compressed) { }
337 0 1 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