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 SCAR 19.3
CC
3
Cov
24%
parse_args
12.0
_get_post_address
2.0
_get_owner_address
2.0
CRAP 6.9
« blib/lib/Mail/LMLM/Types/Egroups.pm ↑ Summary blib/lib/Mail/LMLM/Types/Listar.pm »
1 package Mail::LMLM::Types::Majordomo;
2 3 $Mail::LMLM::Types::Majordomo::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::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(
63 $begin_msg . " write a message with the following line as body:" );
64 0 $htmler->indent_inc();
65 0 $htmler->para( ( $line_prefix . " " . $self->get_group_base() ),
66 { 'bold' => 1 } );
67 0 $htmler->indent_dec();
68 0 $htmler->para("to the following address:");
69 0 $htmler->indent_inc();
70 0 $htmler->start_para();
71 0 $htmler->email_address( "majordomo", $self->get_hostname() );
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( $htmler, "To subscribe",
85 "subscribe" );
86 }
87  
88 sub render_unsubscribe
89 {
90 0 ▶ my $self = shift;
Subroutine render_unsubscribe: not called CC=1 SCAR=6.9
Pod documented
91  
92 0 my $htmler = shift;
93  
94 0 return $self->render_mail_management( $htmler, "To unsubscribe",
95 "unsubscribe" );
96 }
97  
98 sub render_post
99 {
100 0 ▶ my $self = shift;
Subroutine render_post: not called CC=1 SCAR=6.9
Pod documented
101  
102 0 my $htmler = shift;
103  
104 0 return $self->render_something_with_email_addr( $htmler,
105 "Send your messages to the following address: ",
106 \&_get_post_address );
107 }
108  
109 sub render_owner
110 {
111 0 ▶ my $self = shift;
Subroutine render_owner: not called CC=1 SCAR=6.9
Pod documented
112  
113 0 my $htmler = shift;
114  
115 0 return $self->render_something_with_email_addr( $htmler,
116 "Send messages to the mailing-list owner to the following address: ",
117 \&_get_owner_address );
118 }
119  
120 3 1;
121  
122 __END__
« blib/lib/Mail/LMLM/Types/Egroups.pm ↑ Summary blib/lib/Mail/LMLM/Types/Listar.pm »