line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2001-2020 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
|
|
156300
|
use vars '$VERSION'; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
169
|
|
11
|
|
|
|
|
|
|
$VERSION = '3.009'; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
18
|
use base qw/User::Identity::Collection Mail::Reporter/; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
1545
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
16438
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
58
|
|
16
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
32
|
|
|
3
|
|
|
|
|
74
|
|
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
1412
|
use Mail::Box::Identity; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
92
|
|
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
3
|
|
20
|
use Scalar::Util qw/weaken/; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
1002
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new(@) |
24
|
5
|
|
|
5
|
1
|
10
|
{ my $class = shift; |
25
|
5
|
50
|
|
|
|
26
|
unshift @_,'name' if @_ % 2; |
26
|
5
|
|
|
|
|
27
|
$class->Mail::Reporter::new(@_); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub init($) |
30
|
5
|
|
|
5
|
0
|
50
|
{ my ($self, $args) = @_; |
31
|
5
|
|
50
|
|
|
27
|
$args->{item_type} ||= 'Mail::Box::Identity'; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
20
|
$self->Mail::Reporter::init($args); |
34
|
5
|
|
|
|
|
135
|
$self->User::Identity::Collection::init($args); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
weaken($self->{MBC_manager}) |
37
|
5
|
50
|
|
|
|
150
|
if $self->{MBC_manager} = delete $args->{manager}; |
38
|
|
|
|
|
|
|
|
39
|
5
|
|
|
|
|
16
|
$self->{MBC_ftype} = delete $args->{folder_type}; |
40
|
5
|
|
|
|
|
16
|
$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
|
|
|
|
|
|
|
|