| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Archive::Zip::FileMember; |
|
2
|
|
|
|
|
|
|
|
|
3
|
26
|
|
|
26
|
|
180
|
use strict; |
|
|
26
|
|
|
|
|
61
|
|
|
|
26
|
|
|
|
|
934
|
|
|
4
|
26
|
|
|
26
|
|
133
|
use vars qw( $VERSION @ISA ); |
|
|
26
|
|
|
|
|
52
|
|
|
|
26
|
|
|
|
|
1717
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
|
7
|
26
|
|
|
26
|
|
89
|
$VERSION = '1.66'; |
|
8
|
26
|
|
|
|
|
1086
|
@ISA = qw ( Archive::Zip::Member ); |
|
9
|
|
|
|
|
|
|
} |
|
10
|
|
|
|
|
|
|
|
|
11
|
26
|
|
|
|
|
12048
|
use Archive::Zip qw( |
|
12
|
|
|
|
|
|
|
:UTILITY_METHODS |
|
13
|
26
|
|
|
26
|
|
168
|
); |
|
|
26
|
|
|
|
|
63
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub externalFileName { |
|
16
|
444
|
|
|
444
|
1
|
1629
|
shift->{'externalFileName'}; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Return true if I depend on the named file |
|
20
|
|
|
|
|
|
|
sub _usesFileNamed { |
|
21
|
107
|
|
|
107
|
|
165
|
my $self = shift; |
|
22
|
107
|
|
|
|
|
156
|
my $fileName = shift; |
|
23
|
107
|
|
|
|
|
220
|
my $xfn = $self->externalFileName(); |
|
24
|
107
|
50
|
|
|
|
223
|
return undef if ref($xfn); |
|
25
|
107
|
|
|
|
|
298
|
return $xfn eq $fileName; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub fh { |
|
29
|
1561
|
|
|
1561
|
1
|
2382
|
my $self = shift; |
|
30
|
|
|
|
|
|
|
$self->_openFile() |
|
31
|
1561
|
100
|
66
|
|
|
4631
|
if !defined($self->{'fh'}) || !$self->{'fh'}->opened(); |
|
32
|
1561
|
|
|
|
|
10270
|
return $self->{'fh'}; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# opens my file handle from my file name |
|
36
|
|
|
|
|
|
|
sub _openFile { |
|
37
|
196
|
|
|
196
|
|
330
|
my $self = shift; |
|
38
|
196
|
|
|
|
|
409
|
my ($status, $fh) = _newFileHandle($self->externalFileName(), 'r'); |
|
39
|
196
|
50
|
|
|
|
631
|
if (!$status) { |
|
40
|
0
|
|
|
|
|
0
|
_ioError("Can't open", $self->externalFileName()); |
|
41
|
0
|
|
|
|
|
0
|
return undef; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
196
|
|
|
|
|
408
|
$self->{'fh'} = $fh; |
|
44
|
196
|
|
|
|
|
586
|
_binmode($fh); |
|
45
|
196
|
|
|
|
|
1517
|
return $fh; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Make sure I close my file handle |
|
49
|
|
|
|
|
|
|
sub endRead { |
|
50
|
467
|
|
|
467
|
1
|
811
|
my $self = shift; |
|
51
|
467
|
|
|
|
|
2852
|
undef $self->{'fh'}; # _closeFile(); |
|
52
|
467
|
|
|
|
|
1478
|
return $self->SUPER::endRead(@_); |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _become { |
|
56
|
18
|
|
|
18
|
|
52
|
my $self = shift; |
|
57
|
18
|
|
|
|
|
44
|
my $newClass = shift; |
|
58
|
18
|
50
|
|
|
|
60
|
return $self if ref($self) eq $newClass; |
|
59
|
18
|
|
|
|
|
55
|
delete($self->{'externalFileName'}); |
|
60
|
18
|
|
|
|
|
175
|
delete($self->{'fh'}); |
|
61
|
18
|
|
|
|
|
129
|
return $self->SUPER::_become($newClass); |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |