File Coverage

blib/lib/Mail/LMLM/Types/Listar.pm
Criterion Covered Total %
statement 9 46 19.5
branch 0 2 0.0
condition n/a
subroutine 3 13 23.0
pod 8 8 100.0
total 20 69 28.9


line stmt bran cond sub pod time code
1             package Mail::LMLM::Types::Listar;
2             $Mail::LMLM::Types::Listar::VERSION = '0.6805';
3 1     1   6 use strict;
  1         2  
  1         24  
4 1     1   4 use warnings;
  1         2  
  1         23  
5              
6 1     1   4 use vars qw(@ISA);
  1         2  
  1         387  
7              
8             @ISA=qw(Mail::LMLM::Types::Base);
9              
10             sub parse_args
11             {
12 0     0 1   my $self = shift;
13              
14 0           my $args = shift;
15              
16 0           $args = $self->SUPER::parse_args($args);
17              
18 0           return $args;
19             }
20              
21             sub group_form
22             {
23 0     0 1   my $self = shift;
24              
25 0           my $add = shift;
26              
27             return (
28 0 0         ( $self->get_group_base() .
29             ($add ? ("-" . $add) : "") )
30             ,
31             $self->get_hostname()
32             );
33             }
34              
35             sub get_request_address
36             {
37 0     0 1   my $self = shift;
38              
39 0           return $self->group_form("request");
40             }
41              
42             sub _get_post_address
43             {
44 0     0     my $self = shift;
45              
46 0           return $self->group_form();
47             }
48              
49             sub _get_owner_address
50             {
51 0     0     my $self = shift;
52              
53 0           return $self->group_form("owner");
54             }
55              
56             sub render_sub_or_unsub
57             {
58 0     0 1   my $self = shift;
59              
60 0           my $htmler = shift;
61              
62 0           my $command = shift;
63              
64 0           $htmler->para("Send a message containing the following line:");
65 0           $htmler->indent_inc();
66 0           $htmler->para("$command", {'bold' => 1});
67 0           $htmler->indent_dec();
68 0           $htmler->para("To the following address:");
69 0           $htmler->indent_inc();
70 0           $htmler->email_address(
71             $self->get_request_address()
72             );
73 0           $htmler->indent_dec();
74              
75 0           return 0;
76             }
77              
78             sub render_subscribe
79             {
80 0     0 1   my $self = shift;
81              
82 0           my $htmler = shift;
83              
84 0           return $self->render_sub_or_unsub($htmler, "subscribe");
85             }
86              
87             sub render_unsubscribe
88             {
89 0     0 1   my $self = shift;
90              
91 0           my $htmler = shift;
92              
93 0           return $self->render_sub_or_unsub($htmler, "unsubscribe");
94             }
95              
96             sub render_post
97             {
98 0     0 1   my $self = shift;
99              
100 0           my $htmler = shift;
101              
102 0           return $self->render_something_with_email_addr(
103             $htmler,
104             "Send your messages to the following address: ",
105             \&_get_post_address
106             );
107             }
108              
109             sub render_owner
110             {
111 0     0 1   my $self = shift;
112              
113 0           my $htmler = shift;
114              
115 0           return $self->render_something_with_email_addr(
116             $htmler,
117             "Send messages to the mailing-list owner to the following address: ",
118             \&_get_owner_address
119             );
120             }
121              
122             1;
123              
124             __END__