line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::ListDetector::Detector::Listbox; |
2
|
|
|
|
|
|
|
|
3
|
39
|
|
|
39
|
|
210
|
use strict; |
|
39
|
|
|
|
|
85
|
|
|
39
|
|
|
|
|
1394
|
|
4
|
39
|
|
|
39
|
|
211
|
use warnings; |
|
39
|
|
|
|
|
79
|
|
|
39
|
|
|
|
|
1116
|
|
5
|
|
|
|
|
|
|
|
6
|
39
|
|
|
39
|
|
228
|
use vars qw($VERSION); |
|
39
|
|
|
|
|
74
|
|
|
39
|
|
|
|
|
2233
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.02'; |
8
|
|
|
|
|
|
|
|
9
|
39
|
|
|
39
|
|
230
|
use base qw(Mail::ListDetector::Detector::Base); |
|
39
|
|
|
|
|
73
|
|
|
39
|
|
|
|
|
3069
|
|
10
|
39
|
|
|
39
|
|
271
|
use Mail::ListDetector::List; |
|
39
|
|
|
|
|
91
|
|
|
39
|
|
|
|
|
962
|
|
11
|
39
|
|
|
39
|
|
220
|
use Carp; |
|
39
|
|
|
|
|
78
|
|
|
39
|
|
|
|
|
5109
|
|
12
|
|
|
|
|
|
|
|
13
|
34
|
|
|
34
|
0
|
128
|
sub DEBUG { 0 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub match { |
16
|
34
|
|
|
34
|
1
|
85
|
my $self = shift; |
17
|
34
|
|
|
|
|
81
|
my $message = shift; |
18
|
34
|
50
|
|
|
|
132
|
print "Got message $message\n" if DEBUG; |
19
|
34
|
50
|
|
|
|
132
|
carp ("Mail::ListDetector::Detector::Listbox - no message supplied") unless defined($message); |
20
|
39
|
|
|
39
|
|
230
|
use Email::Abstract; |
|
39
|
|
|
|
|
75
|
|
|
39
|
|
|
|
|
10550
|
|
21
|
|
|
|
|
|
|
|
22
|
34
|
|
|
|
|
60
|
my $posting_address; |
23
|
34
|
|
|
|
|
160
|
my $list_software = Email::Abstract->get_header($message, 'List-Software'); |
24
|
34
|
|
|
|
|
2424
|
my $list_id = Email::Abstract->get_header($message, 'List-Id'); |
25
|
34
|
100
|
100
|
|
|
2466
|
if(defined($list_software) && ($list_software =~ m/listbox.com v/)) { |
|
|
100
|
100
|
|
|
|
|
26
|
1
|
50
|
33
|
|
|
9
|
unless (defined($list_id) && ($list_id =~ m/<([^\@]+\@[^\@]+)>/)) { return undef; } |
|
0
|
|
|
|
|
0
|
|
27
|
1
|
|
|
|
|
3
|
$posting_address = $1; |
28
|
1
|
|
|
|
|
2
|
chomp($list_software); |
29
|
|
|
|
|
|
|
} elsif(defined($list_id) && ($list_id =~ m/<([^\@]+\@v2.listbox.com)>/)) { |
30
|
1
|
|
|
|
|
4
|
$posting_address = $1; |
31
|
1
|
|
|
|
|
2
|
$list_software = 'listbox.com v2.0'; |
32
|
|
|
|
|
|
|
} else { |
33
|
32
|
|
|
|
|
387
|
return undef; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
14
|
my $list = new Mail::ListDetector::List; |
37
|
2
|
|
|
|
|
8
|
$list->listname($posting_address); |
38
|
2
|
|
|
|
|
7
|
$list->listsoftware($list_software); |
39
|
2
|
|
|
|
|
7
|
$list->posting_address($posting_address); |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
|
|
9
|
return $list; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |