line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::LMLM::Types::Base; |
2
|
|
|
|
|
|
|
$Mail::LMLM::Types::Base::VERSION = '0.6806'; |
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Mail::LMLM::Object; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
970
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
@ISA = qw(Mail::LMLM::Object); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse_args |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $args = shift; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my ( @left, $key, $value ); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
while ( scalar(@$args) ) |
21
|
|
|
|
|
|
|
{ |
22
|
0
|
|
|
|
|
|
$key = shift(@$args); |
23
|
0
|
|
|
|
|
|
$value = shift(@$args); |
24
|
0
|
0
|
|
|
|
|
if ( $key =~ /^-?(id)$/ ) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
25
|
|
|
|
|
|
|
{ |
26
|
0
|
|
|
|
|
|
$self->{'id'} = $value; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(group_base)$/ ) |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
|
|
|
$self->{'group_base'} = $value; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(desc|description)$/ ) |
33
|
|
|
|
|
|
|
{ |
34
|
0
|
|
|
|
|
|
$self->{'description'} = $value; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(hostname|host)$/ ) |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
|
|
|
$self->{'hostname'} = $value; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(homepage)$/ ) |
41
|
|
|
|
|
|
|
{ |
42
|
0
|
|
|
|
|
|
$self->{'homepage'} = $value; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(online_archive)$/ ) |
45
|
|
|
|
|
|
|
{ |
46
|
0
|
|
|
|
|
|
$self->{'online_archive'} = $value; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(guidelines)$/ ) |
49
|
|
|
|
|
|
|
{ |
50
|
0
|
|
|
|
|
|
$self->{'guidelines'} = $value; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
elsif ( $key =~ /^-?(notes)$/ ) |
53
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
|
|
|
$self->{'notes'} = $value; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
else |
57
|
|
|
|
|
|
|
{ |
58
|
0
|
|
|
|
|
|
push @left, $key, $value; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return ( \@left ); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub initialize |
66
|
|
|
|
|
|
|
{ |
67
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
$self->parse_args( [@_] ); |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
return 0; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub get_id |
75
|
|
|
|
|
|
|
{ |
76
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
return $self->{'id'}; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub get_description |
82
|
|
|
|
|
|
|
{ |
83
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $self->{'description'}; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub get_homepage |
89
|
|
|
|
|
|
|
{ |
90
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return $self->{'homepage'}; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub get_group_base |
96
|
|
|
|
|
|
|
{ |
97
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
98
|
|
|
|
|
|
|
|
99
|
0
|
|
|
|
|
|
return $self->{'group_base'}; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub get_hostname |
103
|
|
|
|
|
|
|
{ |
104
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
105
|
|
|
|
|
|
|
|
106
|
0
|
|
0
|
|
|
|
return $self->{'hostname'} || $self->get_default_hostname(); |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub get_online_archive |
110
|
|
|
|
|
|
|
{ |
111
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
return $self->{'online_archive'}; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub get_guidelines |
117
|
|
|
|
|
|
|
{ |
118
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
119
|
|
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
return $self->{'guidelines'}; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub render_subscribe |
124
|
|
|
|
|
|
|
{ |
125
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
126
|
|
|
|
|
|
|
|
127
|
0
|
|
|
|
|
|
my $htmler = shift; |
128
|
|
|
|
|
|
|
|
129
|
0
|
|
|
|
|
|
return 0; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub render_unsubscribe |
133
|
|
|
|
|
|
|
{ |
134
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
135
|
|
|
|
|
|
|
|
136
|
0
|
|
|
|
|
|
my $htmler = shift; |
137
|
|
|
|
|
|
|
|
138
|
0
|
|
|
|
|
|
return 0; |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
sub render_post |
142
|
|
|
|
|
|
|
{ |
143
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
144
|
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
|
my $htmler = shift; |
146
|
|
|
|
|
|
|
|
147
|
0
|
|
|
|
|
|
return 0; |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
sub render_owner |
151
|
|
|
|
|
|
|
{ |
152
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
153
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
my $htmler = shift; |
155
|
|
|
|
|
|
|
|
156
|
0
|
|
|
|
|
|
return 0; |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
sub render_none |
160
|
|
|
|
|
|
|
{ |
161
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
162
|
|
|
|
|
|
|
|
163
|
0
|
|
|
|
|
|
my $htmler = shift; |
164
|
|
|
|
|
|
|
|
165
|
0
|
|
|
|
|
|
$htmler->para("None."); |
166
|
|
|
|
|
|
|
|
167
|
0
|
|
|
|
|
|
return 0; |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub render_homepage |
171
|
|
|
|
|
|
|
{ |
172
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
173
|
|
|
|
|
|
|
|
174
|
0
|
|
|
|
|
|
my $htmler = shift; |
175
|
|
|
|
|
|
|
|
176
|
0
|
|
|
|
|
|
my $homepage = $self->get_homepage(); |
177
|
|
|
|
|
|
|
|
178
|
0
|
0
|
|
|
|
|
if ($homepage) |
179
|
|
|
|
|
|
|
{ |
180
|
0
|
|
|
|
|
|
$htmler->start_para(); |
181
|
0
|
|
|
|
|
|
$htmler->url($homepage); |
182
|
0
|
|
|
|
|
|
$htmler->end_para(); |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
else |
185
|
|
|
|
|
|
|
{ |
186
|
0
|
|
|
|
|
|
$self->render_none($htmler); |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
0
|
|
|
|
|
|
return 0; |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub render_online_archive |
193
|
|
|
|
|
|
|
{ |
194
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
195
|
|
|
|
|
|
|
|
196
|
0
|
|
|
|
|
|
my $htmler = shift; |
197
|
|
|
|
|
|
|
|
198
|
0
|
|
|
|
|
|
my $archive = $self->get_online_archive(); |
199
|
|
|
|
|
|
|
|
200
|
0
|
0
|
|
|
|
|
if ( ref($archive) eq "CODE" ) |
|
|
0
|
|
|
|
|
|
201
|
|
|
|
|
|
|
{ |
202
|
0
|
|
|
|
|
|
$archive->( $self, $htmler ); |
203
|
|
|
|
|
|
|
} |
204
|
|
|
|
|
|
|
elsif ( ref($archive) eq "" ) |
205
|
|
|
|
|
|
|
{ |
206
|
0
|
|
|
|
|
|
$htmler->start_para(); |
207
|
0
|
|
|
|
|
|
$htmler->url($archive); |
208
|
0
|
|
|
|
|
|
$htmler->end_para(); |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
else |
211
|
|
|
|
|
|
|
{ |
212
|
0
|
|
|
|
|
|
$self->render_none($htmler); |
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
0
|
|
|
|
|
|
return 0; |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub render_field |
219
|
|
|
|
|
|
|
{ |
220
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
221
|
|
|
|
|
|
|
|
222
|
0
|
|
|
|
|
|
my $htmler = shift; |
223
|
|
|
|
|
|
|
|
224
|
0
|
|
|
|
|
|
my $desc = shift; |
225
|
|
|
|
|
|
|
|
226
|
0
|
0
|
|
|
|
|
if ( ref($desc) eq "CODE" ) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
227
|
|
|
|
|
|
|
{ |
228
|
0
|
|
|
|
|
|
$desc->( $self, $htmler ); |
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
elsif ( ref($desc) eq "ARRAY" ) |
231
|
|
|
|
|
|
|
{ |
232
|
0
|
|
|
|
|
|
foreach my $paragraph (@$desc) |
233
|
|
|
|
|
|
|
{ |
234
|
0
|
|
|
|
|
|
$htmler->para($paragraph); |
235
|
|
|
|
|
|
|
} |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
elsif ( ref($desc) eq "" ) |
238
|
|
|
|
|
|
|
{ |
239
|
0
|
|
|
|
|
|
$htmler->para($desc); |
240
|
|
|
|
|
|
|
} |
241
|
0
|
|
|
|
|
|
return 0; |
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
sub render_description |
245
|
|
|
|
|
|
|
{ |
246
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
247
|
0
|
|
|
|
|
|
my $htmler = shift; |
248
|
0
|
|
|
|
|
|
$self->render_field( $htmler, $self->get_description() ); |
249
|
|
|
|
|
|
|
} |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
sub render_guidelines |
252
|
|
|
|
|
|
|
{ |
253
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
254
|
0
|
|
|
|
|
|
my $htmler = shift; |
255
|
0
|
|
|
|
|
|
$self->render_field( $htmler, $self->get_guidelines() ); |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
sub render_something_with_email_addr |
259
|
|
|
|
|
|
|
{ |
260
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
261
|
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
|
my $htmler = shift; |
263
|
0
|
|
|
|
|
|
my $begin_msg = shift; |
264
|
0
|
|
|
|
|
|
my $address_method = shift; |
265
|
|
|
|
|
|
|
|
266
|
0
|
|
|
|
|
|
$htmler->para($begin_msg); |
267
|
0
|
|
|
|
|
|
$htmler->indent_inc(); |
268
|
0
|
|
|
|
|
|
$htmler->start_para(); |
269
|
0
|
|
|
|
|
|
$htmler->email_address( $self->$address_method() ); |
270
|
0
|
|
|
|
|
|
$htmler->end_para(); |
271
|
0
|
|
|
|
|
|
$htmler->indent_dec(); |
272
|
|
|
|
|
|
|
|
273
|
0
|
|
|
|
|
|
return 0; |
274
|
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
1; |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
__END__ |