line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Archive::Zip::FileMember; |
2
|
|
|
|
|
|
|
|
3
|
28
|
|
|
28
|
|
207
|
use strict; |
|
28
|
|
|
|
|
61
|
|
|
28
|
|
|
|
|
962
|
|
4
|
28
|
|
|
28
|
|
143
|
use vars qw( $VERSION @ISA ); |
|
28
|
|
|
|
|
62
|
|
|
28
|
|
|
|
|
1833
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
28
|
|
|
28
|
|
88
|
$VERSION = '1.68'; |
8
|
28
|
|
|
|
|
1224
|
@ISA = qw ( Archive::Zip::Member ); |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
28
|
|
|
|
|
13601
|
use Archive::Zip qw( |
12
|
|
|
|
|
|
|
:UTILITY_METHODS |
13
|
28
|
|
|
28
|
|
194
|
); |
|
28
|
|
|
|
|
60
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub externalFileName { |
16
|
649
|
|
|
649
|
1
|
3322
|
shift->{'externalFileName'}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Return true if I depend on the named file |
20
|
|
|
|
|
|
|
sub _usesFileNamed { |
21
|
109
|
|
|
109
|
|
206
|
my $self = shift; |
22
|
109
|
|
|
|
|
261
|
my $fileName = shift; |
23
|
109
|
|
|
|
|
245
|
my $xfn = $self->externalFileName(); |
24
|
109
|
50
|
|
|
|
244
|
return undef if ref($xfn); |
25
|
109
|
|
|
|
|
349
|
return $xfn eq $fileName; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub fh { |
29
|
2650
|
|
|
2650
|
1
|
4124
|
my $self = shift; |
30
|
|
|
|
|
|
|
$self->_openFile() |
31
|
2650
|
100
|
66
|
|
|
8402
|
if !defined($self->{'fh'}) || !$self->{'fh'}->opened(); |
32
|
2650
|
|
|
|
|
19005
|
return $self->{'fh'}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# opens my file handle from my file name |
36
|
|
|
|
|
|
|
sub _openFile { |
37
|
317
|
|
|
317
|
|
493
|
my $self = shift; |
38
|
317
|
|
|
|
|
715
|
my ($status, $fh) = _newFileHandle($self->externalFileName(), 'r'); |
39
|
317
|
50
|
|
|
|
1057
|
if (!$status) { |
40
|
0
|
|
|
|
|
0
|
_ioError("Can't open", $self->externalFileName()); |
41
|
0
|
|
|
|
|
0
|
return undef; |
42
|
|
|
|
|
|
|
} |
43
|
317
|
|
|
|
|
701
|
$self->{'fh'} = $fh; |
44
|
317
|
|
|
|
|
966
|
_binmode($fh); |
45
|
317
|
|
|
|
|
2695
|
return $fh; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Make sure I close my file handle |
49
|
|
|
|
|
|
|
sub endRead { |
50
|
727
|
|
|
727
|
1
|
1126
|
my $self = shift; |
51
|
727
|
|
|
|
|
5128
|
undef $self->{'fh'}; # _closeFile(); |
52
|
727
|
|
|
|
|
2577
|
return $self->SUPER::endRead(@_); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _become { |
56
|
19
|
|
|
19
|
|
48
|
my $self = shift; |
57
|
19
|
|
|
|
|
48
|
my $newClass = shift; |
58
|
19
|
50
|
|
|
|
64
|
return $self if ref($self) eq $newClass; |
59
|
19
|
|
|
|
|
99
|
delete($self->{'externalFileName'}); |
60
|
19
|
|
|
|
|
229
|
delete($self->{'fh'}); |
61
|
19
|
|
|
|
|
151
|
return $self->SUPER::_become($newClass); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |