| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Acme::Archive::Mbox::File; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
22988
|
use warnings; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
88
|
|
|
4
|
3
|
|
|
3
|
|
14
|
use strict; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
926
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Acme::Archive::Mbox::File - Archive::Mbox file |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.01 |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
No user-servicable parts inside. |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Acme::Archive::Mbox::File; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $file = Acme::Archive::Mbox->new(name => 'file/name', contents => $contents, ...); |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 FUNCTIONS |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 new |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Create an Acme::Archive::Mbox::File object. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub new { |
|
36
|
8
|
|
|
8
|
1
|
829
|
my $class = shift; |
|
37
|
8
|
|
|
|
|
14
|
my $name = shift; |
|
38
|
8
|
|
|
|
|
15
|
my $contents = shift; |
|
39
|
8
|
|
|
|
|
32
|
my %attr = @_; |
|
40
|
|
|
|
|
|
|
|
|
41
|
8
|
|
|
|
|
46
|
my $self = { name => $name, contents => $contents, %attr }; |
|
42
|
8
|
100
|
66
|
|
|
82
|
return unless ($self->{name} and $self->{contents}); |
|
43
|
7
|
|
|
|
|
71
|
return bless $self, $class; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 name |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Returns the name of the file. |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub name { |
|
53
|
11
|
|
|
11
|
1
|
1019
|
my $self = shift; |
|
54
|
11
|
|
|
|
|
68
|
return $self->{name}; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 contents |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Returns the contents of the file. |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub contents { |
|
64
|
6
|
|
|
6
|
1
|
18
|
my $self = shift; |
|
65
|
6
|
|
|
|
|
50
|
return $self->{contents}; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 mode |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Returns the mode of the file. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub mode { |
|
75
|
4
|
|
|
4
|
1
|
7
|
my $self = shift; |
|
76
|
4
|
|
|
|
|
17
|
return $self->{mode}; |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 uid |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Returns the owner's uid. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub uid { |
|
86
|
5
|
|
|
5
|
1
|
14
|
my $self = shift; |
|
87
|
5
|
|
|
|
|
32
|
return $self->{uid}; |
|
88
|
|
|
|
|
|
|
} |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 gid |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Returns the gid of the group which owns the file. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=cut |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub gid { |
|
97
|
4
|
|
|
4
|
1
|
9
|
my $self = shift; |
|
98
|
4
|
|
|
|
|
22
|
return $self->{gid}; |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 mtime |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Returns the mtime of the file as a unix timestamp. |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub mtime { |
|
108
|
4
|
|
|
4
|
1
|
8
|
my $self = shift; |
|
109
|
4
|
|
|
|
|
36
|
return $self->{mtime}; |
|
110
|
|
|
|
|
|
|
} |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 AUTHOR |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Ian Kilgore, C<< >> |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 BUGS |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=over 4 |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item This module is pretty much a hash. Don't expect it to be very robust. |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=back |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 NOTES |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=over 4 |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item No special precaution is made against storing files with absolute |
|
129
|
|
|
|
|
|
|
paths or directory traversals in their names; this is up to the |
|
130
|
|
|
|
|
|
|
extraction tool. |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=back |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Copyright 2008 Ian Kilgore, all rights reserved. |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
139
|
|
|
|
|
|
|
under the same terms as Perl itself. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=cut |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
1; # End of Acme::Archive::Mbox |