line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::LMLM::Types::Majordomo; |
2
|
|
|
|
|
|
|
$Mail::LMLM::Types::Majordomo::VERSION = '0.6805'; |
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Mail::LMLM::Types::Base; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
492
|
|
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($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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
0
|
1
|
|
my $self = shift; |
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
|
|
|
|
|
|
|
1; |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
__END__ |