line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Archive::Peek::Tar; |
2
|
1
|
|
|
1
|
|
8
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
3
|
1
|
|
|
1
|
|
336
|
use Carp qw(confess); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
58
|
|
4
|
1
|
|
|
1
|
|
1468
|
use Archive::Tar; |
|
1
|
|
|
|
|
115628
|
|
|
1
|
|
|
|
|
285
|
|
5
|
|
|
|
|
|
|
extends 'Archive::Peek'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub tar { |
8
|
4
|
|
|
4
|
0
|
9
|
my $self = shift; |
9
|
4
|
|
|
|
|
23
|
my $filename = $self->filename; |
10
|
|
|
|
|
|
|
|
11
|
4
|
|
33
|
|
|
37
|
my $tar = Archive::Tar->new( $filename->stringify ) |
12
|
|
|
|
|
|
|
|| confess("Error reading $filename"); |
13
|
4
|
|
|
|
|
32670
|
return $tar; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub files { |
17
|
2
|
|
|
2
|
1
|
847
|
my $self = shift; |
18
|
2
|
|
|
|
|
12
|
my $tar = $self->tar; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my @files |
21
|
2
|
|
|
|
|
16
|
= sort map { $_->full_path } grep { $_->is_file } $tar->get_files(); |
|
8
|
|
|
|
|
189
|
|
|
16
|
|
|
|
|
207
|
|
22
|
2
|
|
|
|
|
125
|
return @files; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub file { |
26
|
2
|
|
|
2
|
1
|
7
|
my ( $self, $filename ) = @_; |
27
|
2
|
|
|
|
|
9
|
my $tar = $self->tar; |
28
|
|
|
|
|
|
|
|
29
|
2
|
|
|
|
|
11
|
return $tar->get_content($filename); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |