line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::ListDetector::Detector::LetterRip; |
2
|
|
|
|
|
|
|
|
3
|
39
|
|
|
39
|
|
221
|
use strict; |
|
39
|
|
|
|
|
74
|
|
|
39
|
|
|
|
|
1475
|
|
4
|
39
|
|
|
39
|
|
229
|
use warnings; |
|
39
|
|
|
|
|
82
|
|
|
39
|
|
|
|
|
1094
|
|
5
|
|
|
|
|
|
|
|
6
|
39
|
|
|
39
|
|
207
|
use vars qw($VERSION); |
|
39
|
|
|
|
|
72
|
|
|
39
|
|
|
|
|
2006
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
39
|
|
|
39
|
|
207
|
use base qw(Mail::ListDetector::Detector::Base); |
|
39
|
|
|
|
|
73
|
|
|
39
|
|
|
|
|
3805
|
|
10
|
39
|
|
|
39
|
|
267
|
use Mail::ListDetector::List; |
|
39
|
|
|
|
|
188
|
|
|
39
|
|
|
|
|
931
|
|
11
|
39
|
|
|
39
|
|
266
|
use Carp; |
|
39
|
|
|
|
|
115
|
|
|
39
|
|
|
|
|
5389
|
|
12
|
|
|
|
|
|
|
|
13
|
17
|
|
|
17
|
0
|
67
|
sub DEBUG { 0 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub match { |
16
|
17
|
|
|
17
|
1
|
93
|
my $self = shift; |
17
|
17
|
|
|
|
|
38
|
my $message = shift; |
18
|
17
|
50
|
|
|
|
65
|
print "Got message $message\n" if DEBUG; |
19
|
17
|
50
|
|
|
|
71
|
carp ("Mail::ListDetector::Detector::LetterRip - no message supplied") unless defined($message); |
20
|
39
|
|
|
39
|
|
251
|
use Email::Abstract; |
|
39
|
|
|
|
|
88
|
|
|
39
|
|
|
|
|
10249
|
|
21
|
|
|
|
|
|
|
|
22
|
17
|
|
|
|
|
33
|
my $posting_address; |
23
|
17
|
|
|
|
|
381
|
my $list_software = Email::Abstract->get_header($message, 'List-Software'); |
24
|
17
|
100
|
100
|
|
|
1236
|
if(defined($list_software) && ($list_software =~ m/(LetterRip (Pro ){0,1}[\w\.]+)/)) { |
25
|
2
|
|
|
|
|
8
|
$list_software = $1; |
26
|
|
|
|
|
|
|
} else { |
27
|
15
|
|
|
|
|
204
|
return undef; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
2
|
50
|
|
|
|
8
|
return undef unless my $sender = Email::Abstract->get_header($message, 'Sender'); |
31
|
2
|
|
|
|
|
142
|
chomp $sender; |
32
|
2
|
|
|
|
|
12
|
$sender =~ s/<(.*)>/$1/; |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
|
|
19
|
my $list = new Mail::ListDetector::List; |
35
|
2
|
|
|
|
|
11
|
$list->listname($sender); |
36
|
2
|
|
|
|
|
8
|
$list->listsoftware($list_software); |
37
|
2
|
|
|
|
|
10
|
$list->posting_address($sender); |
38
|
|
|
|
|
|
|
|
39
|
2
|
|
|
|
|
9
|
return $list; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |