blib/lib/Mail/LMLM/Types/GoogleGroups.pm

filter: Statementstmt 32.6% 15 / 46 Branchbran 0.0% 0 / 12 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 36.3% 4 / 11 Podpod 100% 5 / 5 totaltotal 30.3% 24 / 79 CC 8 SCAR 20.2
CC
8
Cov
25%
parse_args
20.0
get_maintenance_url
6.0
group_form
6.0
CRAP 7.6
« blib/lib/Mail/LMLM/Render/HTML.pm ↑ Summary blib/lib/Mail/LMLM/Types/Mailman.pm »
1 package Mail::LMLM::Types::GoogleGroups;
2 3 $Mail::LMLM::Types::GoogleGroups::VERSION = '0.6805';
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use Mail::LMLM::Types::Mailman;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 @ISA=qw(Mail::LMLM::Types::Mailman);
11  
12 sub parse_args
13 {
14 0 ▶ my $self = shift;
Subroutine parse_args: not called CC=4 SCAR=30.0
Pod documented
15  
16 0 my $args = shift;
17  
18  
19 0 $args = $self->SUPER::parse_args($args);
20  
21 0 my (@left, $key, $value);
22  
23 0 ▶ while (scalar(@$args))
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @$args) 0 0 0
24 {
25 0 $key = shift(@$args);
26 0 $value = shift(@$args);
27  
28 0 ▶ if ($key =~ /^-?(maintenance[-_]url)$/)
Branch: 2 branches
BranchTrueFalseTotal
if ($key =~ /^-?(maintenance[-_]url)$/) { } 0 0 0
elsif ($key =~ /^-?(owner)$/) { } 0 0 0
29 {
30 0 $self->{'maintenance_url'} = $value;
31 }
32 elsif ($key =~ /^-?(owner)$/)
33 {
34 0 $self->{'owner'} = $value;
35 }
36 else
37 {
38 0 push @left, $key, $value;
39 }
40 }
41  
42 0 $self->{'google_homepage'} =
43 "http://groups.google.com/group/" . $self->get_group_base(). "/";
44  
45 0 $self->{'homepage'} = $self->{'google_homepage'};
46  
47 0 return \@left;
48 }
49  
50 sub get_maintenance_url
51 {
52 0 ▶ my $self = shift;
Subroutine get_maintenance_url: not called CC=2 SCAR=17.9
Pod documented
53  
54 0 ▶ if (exists($self->{'maintenance_url'}))
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'maintenance_url'}) { } 0 0 0
55 {
56 0 return $self->{'maintenance_url'};
57 }
58 else
59 {
60 0 return $self->{'google_homepage'};
61 }
62 }
63  
64 sub group_form
65 {
66 0 ▶ my $self = shift;
Subroutine group_form: not called CC=2 SCAR=17.9
Pod documented
67  
68 0 my $add = shift;
69  
70 return (
71 0 ▶ ( $self->get_group_base() .
Branch: 1 branch
BranchTrueFalseTotal
$add ? : 0 0 0
72 ($add ? ("-" . $add) : "") )
73 ,
74 $self->get_hostname()
75 );
76 }
77  
78 sub _get_post_address
79 {
80 0 ▶ my $self = shift;
Subroutine _get_post_address: not called CC=1 SCAR=6.9
81  
82 0 return $self->group_form();
83 }
84  
85 sub _get_owner_address
86 {
87 0 ▶ my $self = shift;
Subroutine _get_owner_address: not called CC=2 SCAR=17.9
88  
89 0 ▶ if ($self->{owner})
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'owner'}) { } 0 0 0
90 {
91 0 return @{$self->{owner}};
92 }
93 else
94 {
95 0 return $self->group_form("owner");
96 }
97 }
98  
99 sub get_default_hostname
100 {
101 0 ▶ return "googlegroups.com";
Subroutine get_default_hostname: not called CC=1 SCAR=6.9
Pod documented
102 }
103  
104 sub get_online_archive
105 {
106 0 ▶ my $self = shift;
Subroutine get_online_archive: not called CC=2 SCAR=17.9
Pod documented
107  
108 0 ▶ return $self->SUPER::get_online_archive()
Condition0%0/3
$self->SUPER::get_online_archive || $self->get_maintenance_url
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->SUPER::get_online_archive || $self->get_maintenance_url
$self->SUPER::get_online_archive $self->get_maintenance_url
Truth table0%0/3
A || B
A= $self->SUPER::get_online_archiveB= $self->get_maintenance_url
ABresult
1X1
011
000
109 || $self->get_maintenance_url();
110 }
111 3 1;
112  
113 __END__
« blib/lib/Mail/LMLM/Render/HTML.pm ↑ Summary blib/lib/Mail/LMLM/Types/Mailman.pm »