| 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; | |