| 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 | ▶ | use vars '$VERSION'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | 3 | $VERSION = '3.009'; | |||||||||||
| 12 | |||||||||||||
| 13 | 3 | ▶ | use base qw/User::Identity::Collection Mail::Reporter/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | 3 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 3 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 17 | |||||||||||||
| 18 | 3 | ▶ | use Mail::Box::Identity; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 19 | |||||||||||||
| 20 | 3 | ▶ | use Scalar::Util qw/weaken/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | |||||||||||||
| 22 | |||||||||||||
| 23 | sub new(@) | ||||||||||||
| 24 | 5 | ▶ | { my $class = shift; | ||||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||
| 25 | 5 | ▶ | unshift @_,'name' if @_ % 2; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 26 | 5 | $class->Mail::Reporter::new(@_); | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | sub init($) | ||||||||||||
| 30 | 5 | ▶ | { my ($self, $args) = @_; | ||||||||||
|
Subroutine
init: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||
| 31 | 5 | ▶ | $args->{item_type} ||= 'Mail::Box::Identity'; | ||||||||||
|
Condition50%1/2
$args->{"item_type"} ||= "Mail::Box::Identity"
MC/DC0%0/1
$args->{"item_type"} ||= "Mail::Box::Identity"
$args->{"item_type"}
Truth table50%1/2
A
A= $args->{"item_type"}
| |||||||||||||
| 32 | |||||||||||||
| 33 | 5 | $self->Mail::Reporter::init($args); | |||||||||||
| 34 | 5 | $self->User::Identity::Collection::init($args); | |||||||||||
| 35 | |||||||||||||
| 36 | weaken($self->{MBC_manager}) | ||||||||||||
| 37 | 5 | ▶ | if $self->{MBC_manager} = delete $args->{manager}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 38 | |||||||||||||
| 39 | 5 | $self->{MBC_ftype} = delete $args->{folder_type}; | |||||||||||
| 40 | 5 | $self; | |||||||||||
| 41 | } | ||||||||||||
| 42 | |||||||||||||
| 43 | sub type() { 'folders' } | ||||||||||||
| 44 | |||||||||||||
| 45 | #------------------------------------------ | ||||||||||||
| 46 | |||||||||||||
| 47 | |||||||||||||
| 48 | sub manager() | ||||||||||||
| 49 | 0 | ▶ | { my $self = shift; | ||||||||||
|
Subroutine
manager: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||
| 50 | return $self->{MBC_manager} | ||||||||||||
| 51 | 0 | ▶ | if defined $self->{MBC_manager}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 52 | |||||||||||||
| 53 | 0 | my $parent = $self->parent; | |||||||||||
| 54 | 0 | ▶ | defined $parent ? $self->parent->manager : undef; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 55 | } | ||||||||||||
| 56 | |||||||||||||
| 57 | #------------------------------------------ | ||||||||||||
| 58 | |||||||||||||
| 59 | |||||||||||||
| 60 | sub folderType() | ||||||||||||
| 61 | 0 | ▶ | { my $self = shift; | ||||||||||
|
Subroutine
folderType: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||
| 62 | 0 | ▶ | return($self->{MBC_ftype} = shift) if @_; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 63 | 0 | ▶ | return $self->{MBC_ftype} if exists $self->{MBC_ftype}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 64 | |||||||||||||
| 65 | 0 | ▶ | if(my $parent = $self->parent) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 66 | 0 | { return $self->{MBC_ftype} = $parent->folderType; | |||||||||||
| 67 | } | ||||||||||||
| 68 | |||||||||||||
| 69 | 0 | undef; | |||||||||||
| 70 | } | ||||||||||||
| 71 | |||||||||||||
| 72 | #------------------------------------------ | ||||||||||||
| 73 | |||||||||||||
| 74 | 3 | 1; | |||||||||||
| 75 | |||||||||||||