line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::Transport::Dbx; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
32528
|
use 5.00503; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
191
|
|
4
|
4
|
|
|
4
|
|
25
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
122
|
|
5
|
4
|
|
|
4
|
|
21
|
use Carp; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
316
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
require DynaLoader; |
9
|
4
|
|
|
4
|
|
4252
|
use AutoLoader; |
|
4
|
|
|
|
|
6780
|
|
|
4
|
|
|
|
|
19
|
|
10
|
4
|
|
|
4
|
|
147
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
1791
|
|
11
|
|
|
|
|
|
|
@ISA = qw(Exporter |
12
|
|
|
|
|
|
|
DynaLoader); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
%EXPORT_TAGS = ( 'all' => [ qw( |
15
|
|
|
|
|
|
|
DBX_BADFILE |
16
|
|
|
|
|
|
|
DBX_DATA_READ |
17
|
|
|
|
|
|
|
DBX_EMAIL_FLAG_ISSEEN |
18
|
|
|
|
|
|
|
DBX_FLAG_BODY |
19
|
|
|
|
|
|
|
DBX_INDEXCOUNT |
20
|
|
|
|
|
|
|
DBX_INDEX_OVERREAD |
21
|
|
|
|
|
|
|
DBX_INDEX_READ |
22
|
|
|
|
|
|
|
DBX_INDEX_UNDERREAD |
23
|
|
|
|
|
|
|
DBX_ITEMCOUNT |
24
|
|
|
|
|
|
|
DBX_NEWS_ITEM |
25
|
|
|
|
|
|
|
DBX_NOERROR |
26
|
|
|
|
|
|
|
DBX_TYPE_EMAIL |
27
|
|
|
|
|
|
|
DBX_TYPE_FOLDER |
28
|
|
|
|
|
|
|
DBX_TYPE_NEWS |
29
|
|
|
|
|
|
|
DBX_TYPE_VOID |
30
|
|
|
|
|
|
|
) ] ); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
@EXPORT = qw( |
35
|
|
|
|
|
|
|
DBX_BADFILE |
36
|
|
|
|
|
|
|
DBX_DATA_READ |
37
|
|
|
|
|
|
|
DBX_EMAIL_FLAG_ISSEEN |
38
|
|
|
|
|
|
|
DBX_FLAG_BODY |
39
|
|
|
|
|
|
|
DBX_INDEXCOUNT |
40
|
|
|
|
|
|
|
DBX_INDEX_OVERREAD |
41
|
|
|
|
|
|
|
DBX_INDEX_READ |
42
|
|
|
|
|
|
|
DBX_INDEX_UNDERREAD |
43
|
|
|
|
|
|
|
DBX_ITEMCOUNT |
44
|
|
|
|
|
|
|
DBX_NEWS_ITEM |
45
|
|
|
|
|
|
|
DBX_NOERROR |
46
|
|
|
|
|
|
|
DBX_TYPE_EMAIL |
47
|
|
|
|
|
|
|
DBX_TYPE_FOLDER |
48
|
|
|
|
|
|
|
DBX_TYPE_NEWS |
49
|
|
|
|
|
|
|
DBX_TYPE_VOID |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
$VERSION = '0.07'; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my %FOLDERS; |
55
|
|
|
|
|
|
|
sub Mail::Transport::Dbx::Folder::folder_path { |
56
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
57
|
0
|
|
|
|
|
0
|
my $id = $self->id; |
58
|
0
|
|
|
|
|
0
|
my $dbx = $self->_dbx; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
0
|
my $folders = $FOLDERS{ $dbx }; |
61
|
|
|
|
|
|
|
# get folders data (just first time this function is called) |
62
|
0
|
0
|
|
|
|
0
|
if (! $folders) { |
63
|
0
|
|
|
|
|
0
|
for my $sub ($dbx->subfolders) { |
64
|
0
|
|
|
|
|
0
|
my $i = $sub->id; |
65
|
0
|
|
|
|
|
0
|
$folders->{$i}{'name'} = $sub->name; |
66
|
0
|
|
|
|
|
0
|
$folders->{$i}{'parent_id'} = $sub->parent_id; |
67
|
|
|
|
|
|
|
} |
68
|
0
|
|
|
|
|
0
|
$FOLDERS{ $dbx } = $folders; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
# get path |
71
|
0
|
|
|
|
|
0
|
my @path; |
72
|
0
|
|
|
|
|
0
|
my $i = $id; |
73
|
0
|
|
|
|
|
0
|
unshift @path, $folders->{$id}{'name'}; |
74
|
0
|
|
|
|
|
0
|
while ($i != $folders->{$i}{'parent_id'}) { |
75
|
0
|
|
|
|
|
0
|
$i = $folders->{$i}{'parent_id'}; |
76
|
0
|
|
|
|
|
0
|
unshift @path, $folders->{$i}{'name'}; |
77
|
|
|
|
|
|
|
} |
78
|
0
|
|
|
|
|
0
|
return @path; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub Mail::Transport::Dbx::Folder::DESTROY { |
82
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
83
|
0
|
|
|
|
|
0
|
my $dbx = $self->_dbx; |
84
|
0
|
0
|
|
|
|
0
|
delete $FOLDERS{ $dbx } if defined $dbx; |
85
|
0
|
|
|
|
|
0
|
$self->_DESTROY; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub AUTOLOAD { |
89
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
90
|
|
|
|
|
|
|
# XS function. |
91
|
|
|
|
|
|
|
|
92
|
15
|
|
|
15
|
|
655
|
my $constname; |
93
|
15
|
|
|
|
|
51
|
($constname = $AUTOLOAD) =~ s/.*:://; |
94
|
15
|
50
|
|
|
|
32
|
croak "&Mail::Transport::Dbx::constant not defined" |
95
|
|
|
|
|
|
|
if $constname eq 'constant'; |
96
|
15
|
|
|
|
|
52
|
my ($error, $val) = constant($constname); |
97
|
15
|
50
|
|
|
|
21
|
if ($error) { croak $error; } |
|
0
|
|
|
|
|
0
|
|
98
|
|
|
|
|
|
|
{ |
99
|
4
|
|
|
4
|
|
22
|
no strict 'refs'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
377
|
|
|
15
|
|
|
|
|
15
|
|
100
|
|
|
|
|
|
|
# Fixed between 5.005_53 and 5.005_61 |
101
|
|
|
|
|
|
|
#XXX if ($] >= 5.00561) { |
102
|
|
|
|
|
|
|
#XXX *$AUTOLOAD = sub () { $val }; |
103
|
|
|
|
|
|
|
#XXX } |
104
|
|
|
|
|
|
|
#XXX else { |
105
|
15
|
|
|
15
|
|
66
|
*$AUTOLOAD = sub { $val }; |
|
15
|
|
|
|
|
146
|
|
106
|
|
|
|
|
|
|
#XXX } |
107
|
|
|
|
|
|
|
} |
108
|
15
|
|
|
|
|
38
|
goto &$AUTOLOAD; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
bootstrap Mail::Transport::Dbx $VERSION; |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
# Preloaded methods go here. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
1; |
118
|
|
|
|
|
|
|
__END__ |