line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2001-2019 by [Mark Overmeer]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.02. |
5
|
|
|
|
|
|
|
# This code is part of distribution Mail-Box. Meta-POD processed with |
6
|
|
|
|
|
|
|
# OODoc into POD and HTML manual-pages. See README.md |
7
|
|
|
|
|
|
|
# Copyright Mark Overmeer. Licensed under the same terms as Perl itself. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Mail::Box::Collection; |
10
|
3
|
|
|
3
|
|
120507
|
use vars '$VERSION'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
141
|
|
11
|
|
|
|
|
|
|
$VERSION = '3.008'; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
13
|
use base qw/User::Identity::Collection Mail::Reporter/; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1218
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
12924
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
47
|
|
16
|
3
|
|
|
3
|
|
11
|
use warnings; |
|
3
|
|
|
|
|
29
|
|
|
3
|
|
|
|
|
63
|
|
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
1109
|
use Mail::Box::Identity; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
75
|
|
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
3
|
|
17
|
use Scalar::Util qw/weaken/; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
820
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new(@) |
24
|
5
|
|
|
5
|
1
|
8
|
{ my $class = shift; |
25
|
5
|
50
|
|
|
|
20
|
unshift @_,'name' if @_ % 2; |
26
|
5
|
|
|
|
|
19
|
$class->Mail::Reporter::new(@_); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub init($) |
30
|
5
|
|
|
5
|
0
|
40
|
{ my ($self, $args) = @_; |
31
|
5
|
|
50
|
|
|
22
|
$args->{item_type} ||= 'Mail::Box::Identity'; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
15
|
$self->Mail::Reporter::init($args); |
34
|
5
|
|
|
|
|
93
|
$self->User::Identity::Collection::init($args); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
weaken($self->{MBC_manager}) |
37
|
5
|
50
|
|
|
|
118
|
if $self->{MBC_manager} = delete $args->{manager}; |
38
|
|
|
|
|
|
|
|
39
|
5
|
|
|
|
|
12
|
$self->{MBC_ftype} = delete $args->{folder_type}; |
40
|
5
|
|
|
|
|
15
|
$self; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub type() { 'folders' } |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
#------------------------------------------ |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub manager() |
49
|
0
|
|
|
0
|
1
|
|
{ my $self = shift; |
50
|
|
|
|
|
|
|
return $self->{MBC_manager} |
51
|
0
|
0
|
|
|
|
|
if defined $self->{MBC_manager}; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
my $parent = $self->parent; |
54
|
0
|
0
|
|
|
|
|
defined $parent ? $self->parent->manager : undef; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
#------------------------------------------ |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub folderType() |
61
|
0
|
|
|
0
|
1
|
|
{ my $self = shift; |
62
|
0
|
0
|
|
|
|
|
return($self->{MBC_ftype} = shift) if @_; |
63
|
0
|
0
|
|
|
|
|
return $self->{MBC_ftype} if exists $self->{MBC_ftype}; |
64
|
|
|
|
|
|
|
|
65
|
0
|
0
|
|
|
|
|
if(my $parent = $self->parent) |
66
|
0
|
|
|
|
|
|
{ return $self->{MBC_ftype} = $parent->folderType; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
undef; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#------------------------------------------ |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |
75
|
|
|
|
|
|
|
|