line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Hotline::FileListItem; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## Copyright(c) 1998-2002 by John C. Siracusa. All rights reserved. This |
4
|
|
|
|
|
|
|
## program is free software; you can redistribute it and/or modify it under |
5
|
|
|
|
|
|
|
## the same terms as Perl itself. |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
410
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.80'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
1
|
|
my($class, $data) = @_; |
16
|
0
|
|
|
|
|
|
my($self); |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
if(defined($data)) |
19
|
|
|
|
|
|
|
{ |
20
|
0
|
|
|
|
|
|
my($name_len) = unpack("L", substr($data, 16, 4)); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
$self = |
23
|
|
|
|
|
|
|
{ |
24
|
|
|
|
|
|
|
'TYPE' => substr($data, 0, 4), |
25
|
|
|
|
|
|
|
'CREATOR' => substr($data, 4, 4), |
26
|
|
|
|
|
|
|
'SIZE' => unpack("N", substr($data, 8, 4)), |
27
|
|
|
|
|
|
|
'UNKNOWN' => substr($data, 12, 4), |
28
|
|
|
|
|
|
|
'NAME' => substr($data, 20, $name_len) |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
else |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
|
|
|
$self = |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'TYPE' => undef, |
36
|
|
|
|
|
|
|
'CREATOR' => undef, |
37
|
|
|
|
|
|
|
'SIZE' => 0x00000000, |
38
|
|
|
|
|
|
|
'UNKNOWN' => 0x00000000, |
39
|
|
|
|
|
|
|
'NAME' => undef |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
bless $self, $class; |
44
|
0
|
|
|
|
|
|
return $self; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub type |
48
|
|
|
|
|
|
|
{ |
49
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'TYPE'} = $_[1] if(@_ == 2); |
50
|
0
|
|
|
|
|
|
return $_[0]->{'TYPE'}; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub creator |
54
|
|
|
|
|
|
|
{ |
55
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'CREATOR'} = $_[1] if(@_ == 2); |
56
|
0
|
|
|
|
|
|
return $_[0]->{'CREATOR'}; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub size |
60
|
|
|
|
|
|
|
{ |
61
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'SIZE'} = $_[1] if(@_ == 2); |
62
|
0
|
|
|
|
|
|
return $_[0]->{'SIZE'}; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub name |
66
|
|
|
|
|
|
|
{ |
67
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'NAME'} = $_[1] if(@_ == 2); |
68
|
0
|
|
|
|
|
|
return $_[0]->{'NAME'}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |