line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::LMLM::Types::Majordomo; |
2
|
|
|
|
|
|
|
$Mail::LMLM::Types::Majordomo::VERSION = '0.6807'; |
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Mail::LMLM::Types::Base; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
560
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
@ISA = qw(Mail::LMLM::Types::Base); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse_args |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
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) ) |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
|
|
|
$key = shift(@$args); |
25
|
0
|
|
|
|
|
|
$value = shift(@$args); |
26
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
if ( $key =~ /^-?(owner)$/ ) |
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
|
|
|
0
|
|
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return ( $self->get_group_base(), $self->get_hostname() ); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub _get_owner_address |
48
|
|
|
|
|
|
|
{ |
49
|
0
|
|
|
0
|
|
|
my $self = shift; |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
return @{ $self->{'owner'} }; |
|
0
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub render_mail_management |
55
|
|
|
|
|
|
|
{ |
56
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
|
|
|
|
1; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
__END__ |