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.6807';
3 1     1   6 use strict;
  1         3  
  1         28  
4 1     1   6 use warnings;
  1         2  
  1         26  
5              
6 1     1   5 use vars qw(@ISA);
  1         2  
  1         460  
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 0 0         return ( ( $self->get_group_base() . ( $add ? ( "-" . $add ) : "" ) ),
28             $self->get_hostname() );
29             }
30              
31             sub get_request_address
32             {
33 0     0 1   my $self = shift;
34              
35 0           return $self->group_form("request");
36             }
37              
38             sub _get_post_address
39             {
40 0     0     my $self = shift;
41              
42 0           return $self->group_form();
43             }
44              
45             sub _get_owner_address
46             {
47 0     0     my $self = shift;
48              
49 0           return $self->group_form("owner");
50             }
51              
52             sub render_sub_or_unsub
53             {
54 0     0 1   my $self = shift;
55              
56 0           my $htmler = shift;
57              
58 0           my $command = shift;
59              
60 0           $htmler->para("Send a message containing the following line:");
61 0           $htmler->indent_inc();
62 0           $htmler->para( "$command", { 'bold' => 1 } );
63 0           $htmler->indent_dec();
64 0           $htmler->para("To the following address:");
65 0           $htmler->indent_inc();
66 0           $htmler->email_address( $self->get_request_address() );
67 0           $htmler->indent_dec();
68              
69 0           return 0;
70             }
71              
72             sub render_subscribe
73             {
74 0     0 1   my $self = shift;
75              
76 0           my $htmler = shift;
77              
78 0           return $self->render_sub_or_unsub( $htmler, "subscribe" );
79             }
80              
81             sub render_unsubscribe
82             {
83 0     0 1   my $self = shift;
84              
85 0           my $htmler = shift;
86              
87 0           return $self->render_sub_or_unsub( $htmler, "unsubscribe" );
88             }
89              
90             sub render_post
91             {
92 0     0 1   my $self = shift;
93              
94 0           my $htmler = shift;
95              
96 0           return $self->render_something_with_email_addr( $htmler,
97             "Send your messages to the following address: ",
98             \&_get_post_address );
99             }
100              
101             sub render_owner
102             {
103 0     0 1   my $self = shift;
104              
105 0           my $htmler = shift;
106              
107 0           return $self->render_something_with_email_addr( $htmler,
108             "Send messages to the mailing-list owner to the following address: ",
109             \&_get_owner_address );
110             }
111              
112             1;
113              
114             __END__