line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::IMAP::Envelope; |
2
|
1
|
|
|
1
|
|
22752
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
3
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
5
|
1
|
|
|
1
|
|
1065
|
use Encode (); |
|
1
|
|
|
|
|
17418
|
|
|
1
|
|
|
|
|
30
|
|
6
|
1
|
|
|
1
|
|
650
|
use Mail::IMAP::Address; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use constant { |
9
|
1
|
|
|
|
|
370
|
DATE => 0, |
10
|
|
|
|
|
|
|
SUBJECT => 1, |
11
|
|
|
|
|
|
|
FROM => 2, |
12
|
|
|
|
|
|
|
SENDER => 3, |
13
|
|
|
|
|
|
|
REPLY_TO => 4, |
14
|
|
|
|
|
|
|
TO => 5, |
15
|
|
|
|
|
|
|
CC => 6, |
16
|
|
|
|
|
|
|
BCC => 7, |
17
|
|
|
|
|
|
|
IN_REPLY_TO => 8, |
18
|
|
|
|
|
|
|
MESSAGE_TO => 9, |
19
|
1
|
|
|
1
|
|
8
|
}; |
|
1
|
|
|
|
|
1
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
1
|
|
|
1
|
0
|
32
|
my ($class, $envelope) = @_; |
23
|
1
|
|
|
|
|
6
|
return bless $envelope, $class; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _decode { |
27
|
1
|
50
|
|
1
|
|
8
|
defined($_[0]) ? Encode::decode('MIME-Header', $_[0]) : ''; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
1
|
1
|
4
|
sub subject { _decode($_[0]->[SUBJECT]) } |
31
|
1
|
|
|
1
|
1
|
18
|
sub date { $_[0]->[DATE] } |
32
|
|
|
|
|
|
|
for (qw(FROM SENDER REPLY_TO TO CC BCC)) { |
33
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
169
|
|
34
|
|
|
|
|
|
|
my $idx = __PACKAGE__->can($_)->(); |
35
|
6
|
100
|
|
6
|
|
8177
|
*{__PACKAGE__ . '::' . lc($_)} = sub { [map { Mail::IMAP::Address->new($_) } @{$_[0]->[$idx]||[]}] }; |
|
5
|
|
|
|
|
22
|
|
|
6
|
|
|
|
|
37
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |