line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2001-2023 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.03. |
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
|
|
162315
|
use vars '$VERSION'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
198
|
|
11
|
|
|
|
|
|
|
$VERSION = '3.010'; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
17
|
use base qw/User::Identity::Collection Mail::Reporter/; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
1515
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
28629
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
57
|
|
16
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
41
|
|
|
3
|
|
|
|
|
75
|
|
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
1368
|
use Mail::Box::Identity; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
92
|
|
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
3
|
|
21
|
use Scalar::Util qw/weaken/; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
935
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new(@) |
24
|
5
|
|
|
5
|
1
|
10
|
{ my $class = shift; |
25
|
5
|
50
|
|
|
|
19
|
unshift @_,'name' if @_ % 2; |
26
|
5
|
|
|
|
|
19
|
$class->Mail::Reporter::new(@_); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub init($) |
30
|
5
|
|
|
5
|
0
|
43
|
{ my ($self, $args) = @_; |
31
|
5
|
|
50
|
|
|
23
|
$args->{item_type} ||= 'Mail::Box::Identity'; |
32
|
|
|
|
|
|
|
|
33
|
5
|
|
|
|
|
21
|
$self->Mail::Reporter::init($args); |
34
|
5
|
|
|
|
|
101
|
$self->User::Identity::Collection::init($args); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
weaken($self->{MBC_manager}) |
37
|
5
|
50
|
|
|
|
214
|
if $self->{MBC_manager} = delete $args->{manager}; |
38
|
|
|
|
|
|
|
|
39
|
5
|
|
|
|
|
29
|
$self->{MBC_ftype} = delete $args->{folder_type}; |
40
|
5
|
|
|
|
|
26
|
$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
|
|
|
|
|
|
|
|