External/Tar.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
files
1.0
CRAP 1.0
« External.pm ↑ Summary External/Zip.pm »
1 package Archive::Peek::External::Tar;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use IPC::Run3;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends 'Archive::Peek::External';
5  
6 2 ▶sub files {
Subroutine files: called CC=1 SCAR=0.0
Pod documented
7 2 my $self = shift;
8  
9 2 my $filename = $self->filename;
10 2 run3 [ 'tar', 'ft', $filename ], \undef, \my $out, \undef;
11 2 my @files = sort grep { $_ !~ m{/$} } split $/, $out;
12 2 return @files;
13 }
14  
15 2 ▶sub file {
Subroutine file: called CC=1 SCAR=0.0
Pod documented
16 2 my ( $self, $filename ) = @_;
17  
18 2 my $archive = $self->filename;
19 2 run3 [ 'tar', 'fxO', $archive, $filename ], \undef, \my $out, \undef;
20 2 return $out;
21 }
22  
23 1 __PACKAGE__->meta->make_immutable;
« External.pm ↑ Summary External/Zip.pm »