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

filter: Statementstmt 25.8% 15 / 58 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 4 / 12 Podpod 100% 6 / 6 totaltotal 31.2% 25 / 80 CC 3 SCAR 13.5
CC
3
Cov
24%
parse_args
12.0
_get_post_address
2.0
_get_owner_address
2.0
CRAP 3.9
« Build ↑ Summary blib/lib/Mail/LMLM/Types/Egroups.pm »
1 package Mail::LMLM::Types::Majordomo;
2 3 $Mail::LMLM::Types::Majordomo::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::Base;
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::Base);
11  
12 sub parse_args
13 {
14 0 ▶ my $self = shift;
Subroutine parse_args: not called CC=3 SCAR=24.8
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 =~ /^-?(owner)$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($key =~ /^-?(owner)$/) { } 0 0 0
28 {
29 0 $self->{'owner'} = $value;
30 }
31 else
32 {
33 0 push @left, $key, $value;
34 }
35 }
36  
37 0 return \@left;
38 }
39  
40 sub _get_post_address
41 {
42 0 ▶ my $self = shift;
Subroutine _get_post_address: not called CC=1 SCAR=6.9
43  
44 0 return ($self->get_group_base(), $self->get_hostname());
45 }
46  
47 sub _get_owner_address
48 {
49 0 ▶ my $self = shift;
Subroutine _get_owner_address: not called CC=1 SCAR=6.9
50  
51 0 return @{$self->{'owner'}};
52 }
53  
54 sub render_mail_management
55 {
56 0 ▶ my $self = shift;
Subroutine render_mail_management: not called CC=1 SCAR=6.9
Pod documented
57  
58 0 my $htmler = shift;
59 0 my $begin_msg = shift;
60 0 my $line_prefix = shift;
61  
62 0 $htmler->para($begin_msg . " write a message with the following line as body:");
63 0 $htmler->indent_inc();
64 0 $htmler->para(($line_prefix. " " . $self->get_group_base()), { 'bold' => 1});
65 0 $htmler->indent_dec();
66 0 $htmler->para("to the following address:");
67 0 $htmler->indent_inc();
68 0 $htmler->start_para();
69 0 $htmler->email_address(
70 "majordomo", $self->get_hostname()
71 );
72 0 $htmler->end_para();
73 0 $htmler->indent_dec();
74  
75 0 return 0;
76 }
77  
78 sub render_subscribe
79 {
80 0 ▶ my $self = shift;
Subroutine render_subscribe: not called CC=1 SCAR=6.9
Pod documented
81  
82 0 my $htmler = shift;
83  
84 0 return $self->render_mail_management(
85 $htmler,
86 "To subscribe",
87 "subscribe"
88 );
89 }
90  
91 sub render_unsubscribe
92 {
93 0 ▶ my $self = shift;
Subroutine render_unsubscribe: not called CC=1 SCAR=6.9
Pod documented
94  
95 0 my $htmler = shift;
96  
97 0 return $self->render_mail_management(
98 $htmler,
99 "To unsubscribe",
100 "unsubscribe"
101 );
102 }
103  
104 sub render_post
105 {
106 0 ▶ my $self = shift;
Subroutine render_post: not called CC=1 SCAR=6.9
Pod documented
107  
108 0 my $htmler = shift;
109  
110 0 return $self->render_something_with_email_addr(
111 $htmler,
112 "Send your messages to the following address: ",
113 \&_get_post_address
114 );
115 }
116  
117 sub render_owner
118 {
119 0 ▶ my $self = shift;
Subroutine render_owner: not called CC=1 SCAR=6.9
Pod documented
120  
121 0 my $htmler = shift;
122  
123 0 return $self->render_something_with_email_addr(
124 $htmler,
125 "Send messages to the mailing-list owner to the following address: ",
126 \&_get_owner_address
127 );
128 }
129  
130 3 1;
131  
132 __END__
« Build ↑ Summary blib/lib/Mail/LMLM/Types/Egroups.pm »