Branch Coverage

blib/lib/Alien/Build/Plugin/Extract/CommandLine.pm
Criterion Covered Total %
branch 64 114 56.1


line true false branch
22 3 0 _which('gzip') ? :
30 2 0 _which('bzip2') ? :
36 2 0 _which('xz') ? :
50 20 0 if $^O ne "MSWin32"
51 0 0 if defined $bsd_tar
55 0 0 $out =~ /bsdtar/ ? :
61 0 0 _which('ptar') ? :
20 0 _which('tar') && _windows_tar_is_bsdtar() ? :
0 20 $^O eq 'solaris' && _which('gtar') ? :
0 20 _which('bsdtar') ? :
78 0 2 if ($^O eq 'MSWin32' and _which('tar') and _windows_tar_is_bsdtar()) { }
84 0 2 _which('unzip') ? :
93 0 6 if $?
101 0 0 unless File::Copy::cp($from, $to)
108 0 0 unless rename $from, $to
118 2 4 if ($src =~ /\.(gz|tgz|Z|taz)$/) { }
1 3 elsif ($src =~ /\.(bz2|tbz)$/) { }
1 2 elsif ($src =~ /\.(xz|txz)$/) { }
120 0 2 unless defined $self->gzip_cmd
121 1 1 if ($src =~ /\.(gz|tgz)$/) { }
1 0 elsif ($src =~ /\.(Z|taz)$/) { }
123 0 1 unless $self->_tar_can("tar.gz")
127 0 1 unless $self->_tar_can("tar.Z")
132 0 1 unless defined $self->bzip2_cmd
133 0 1 unless $self->_tar_can("tar.bz2")
137 0 1 unless defined $self->xz_cmd
138 0 1 unless $self->_tar_can("tar.xz")
141 0 6 if ($cmd and $src =~ /\.(gz|bz2|xz|Z)$/) { }
0 12 elsif ($cmd and $src =~ /\.(tgz|tbz|txz|taz)$/) { }
160 7 1 ref $class ? :
164 0 8 if $ext eq "taz"
165 0 8 if $ext eq "tgz"
166 0 8 if $ext eq "tbz"
167 0 8 if $ext eq "txz"
169 1 7 if $ext eq "tar.gz" and $self->_tar_can("tar.gz")
170 1 6 if $ext eq "tar.Z" and $self->_tar_can("tar.Z")
171 1 5 if $ext eq "tar.bz2" and $self->_tar_can("tar.bz2")
172 1 4 if $ext eq "tar.xz" and $self->_tar_can("tar.xz")
174 0 4 if $ext =~ s/\.(gz|Z)$// and not $self->gzip_cmd
175 0 4 if $ext =~ s/\.bz2$// and not $self->bzip2_cmd
176 0 4 if $ext =~ s/\.xz$// and not $self->xz_cmd
178 3 1 if $ext eq "tar" and $self->_tar_can("tar")
179 0 1 if $ext eq "zip" and $self->_tar_can("zip")
197 0 2 if ($self->format eq 'tar.xz' and not $self->handles('tar.xz')) { }
0 2 elsif ($self->format eq 'tar.bz2' and not $self->handles('tar.bz2')) { }
0 2 elsif ($self->format =~ /^tar\.(gz|Z)$/ and not $self->handles($self->format)) { }
0 4 elsif ($self->format eq 'zip' and not $self->handles('zip')) { }
220 0 6 if ($dcon_name)
222 0 0 unless ($dcon_cmd)
227 0 0 unless (-f $dcon_name)
246 0 6 if ($src =~ /\.zip$/i) { }
6 0 elsif ($src =~ /\.tar/ or $src =~ /(\.tgz|\.tbz|\.txz|\.taz)$/i) { }
268 2 10 unless (%tars)
274 12 154 if ($line =~ /^\[ (.*) \]$/) { }
292 0 12 unless $tars{$name}
307 1 11 if ($ext eq "zip")
317 1 11 if ($exit)