line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Archive::Any::Plugin::Zip; |
2
|
|
|
|
|
|
|
our $VERSION = '0.0946'; |
3
|
4
|
|
|
4
|
|
1635
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
148
|
|
4
|
4
|
|
|
4
|
|
39
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
159
|
|
5
|
4
|
|
|
4
|
|
25
|
use base qw(Archive::Any::Plugin); |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
496
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
2574
|
use Archive::Zip qw(:ERROR_CODES); |
|
4
|
|
|
|
|
279335
|
|
|
4
|
|
|
|
|
898
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub can_handle { |
10
|
13
|
|
|
13
|
1
|
65
|
return ( 'application/x-zip', 'application/x-jar', 'application/zip', ); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub files { |
14
|
12
|
|
|
12
|
1
|
39
|
my ( $self, $file ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
12
|
|
|
|
|
62
|
my $z = Archive::Zip->new($file); |
17
|
12
|
|
|
|
|
43887
|
return $z->memberNames; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub extract { |
21
|
2
|
|
|
2
|
1
|
7
|
my ( $self, $file ) = @_; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
9
|
my $z = Archive::Zip->new($file); |
24
|
2
|
|
|
|
|
7132
|
$z->extractTree; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
28555
|
return 1; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub type { |
30
|
2
|
|
|
2
|
0
|
11
|
my $self = shift; |
31
|
2
|
|
|
|
|
15
|
return 'zip'; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# ABSTRACT: Archive::Any wrapper around Archive::Zip |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |