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 SCAR 35.7
CC
8
Cov
25%
parse_args
20.0
get_maintenance_url
6.0
group_form
6.0
CRAP 35.4
« blib/lib/Mail/LMLM.pm ↑ Summary blib/lib/Mail/LMLM/Types/Mailman.pm »
1 package Mail::LMLM::Types::GoogleGroups;
2 3 $Mail::LMLM::Types::GoogleGroups::VERSION = '0.6806';
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 0 $args = $self->SUPER::parse_args($args);
19  
20 0 my ( @left, $key, $value );
21  
22 0 ▶ while ( scalar(@$args) )
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @$args) 0 0 0
23 {
24 0 $key = shift(@$args);
25 0 $value = shift(@$args);
26  
27 0 ▶ if ( $key =~ /^-?(maintenance[-_]url)$/ )
Branch: 2 branches
BranchTrueFalseTotal
if ($key =~ /^-?(maintenance[-_]url)$/) { } 0 0 0
elsif ($key =~ /^-?(owner)$/) { } 0 0 0
28 {
29 0 $self->{'maintenance_url'} = $value;
30 }
31 elsif ( $key =~ /^-?(owner)$/ )
32 {
33 0 $self->{'owner'} = $value;
34 }
35 else
36 {
37 0 push @left, $key, $value;
38 }
39 }
40  
41 0 $self->{'google_homepage'} =
42 "http://groups.google.com/group/" . $self->get_group_base() . "/";
43  
44 0 $self->{'homepage'} = $self->{'google_homepage'};
45  
46 0 return \@left;
47 }
48  
49 sub get_maintenance_url
50 {
51 0 ▶ my $self = shift;
Subroutine get_maintenance_url: not called CC=2 SCAR=17.9
Pod documented
52  
53 0 ▶ if ( exists( $self->{'maintenance_url'} ) )
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'maintenance_url'}) { } 0 0 0
54 {
55 0 return $self->{'maintenance_url'};
56 }
57 else
58 {
59 0 return $self->{'google_homepage'};
60 }
61 }
62  
63 sub group_form
64 {
65 0 ▶ my $self = shift;
Subroutine group_form: not called CC=2 SCAR=17.9
Pod documented
66  
67 0 my $add = shift;
68  
69 0 ▶ return ( ( $self->get_group_base() . ( $add ? ( "-" . $add ) : "" ) ),
Branch: 1 branch
BranchTrueFalseTotal
$add ? : 0 0 0
70 $self->get_hostname() );
71 }
72  
73 sub _get_post_address
74 {
75 0 ▶ my $self = shift;
Subroutine _get_post_address: not called CC=1 SCAR=6.9
76  
77 0 return $self->group_form();
78 }
79  
80 sub _get_owner_address
81 {
82 0 ▶ my $self = shift;
Subroutine _get_owner_address: not called CC=2 SCAR=17.9
83  
84 0 ▶ if ( $self->{owner} )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'owner'}) { } 0 0 0
85 {
86 0 return @{ $self->{owner} };
87 }
88 else
89 {
90 0 return $self->group_form("owner");
91 }
92 }
93  
94 sub get_default_hostname
95 {
96 0 ▶ return "googlegroups.com";
Subroutine get_default_hostname: not called CC=1 SCAR=6.9
Pod documented
97 }
98  
99 sub get_online_archive
100 {
101 0 ▶ my $self = shift;
Subroutine get_online_archive: not called CC=2 SCAR=17.9
Pod documented
102  
103 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
104 || $self->get_maintenance_url();
105 }
106 3 1;
107  
108 __END__
« blib/lib/Mail/LMLM.pm ↑ Summary blib/lib/Mail/LMLM/Types/Mailman.pm »