line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::ListDetector::Detector::GoogleGroups; |
2
|
|
|
|
|
|
|
|
3
|
39
|
|
|
39
|
|
223
|
use strict; |
|
39
|
|
|
|
|
80
|
|
|
39
|
|
|
|
|
1563
|
|
4
|
39
|
|
|
39
|
|
218
|
use warnings; |
|
39
|
|
|
|
|
76
|
|
|
39
|
|
|
|
|
1393
|
|
5
|
39
|
|
|
39
|
|
247
|
use vars qw($VERSION); |
|
39
|
|
|
|
|
98
|
|
|
39
|
|
|
|
|
2468
|
|
6
|
|
|
|
|
|
|
$VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
39
|
|
|
39
|
|
215
|
use base qw(Mail::ListDetector::Detector::Base); |
|
39
|
|
|
|
|
73
|
|
|
39
|
|
|
|
|
3965
|
|
9
|
39
|
|
|
39
|
|
308
|
use Mail::ListDetector::List; |
|
39
|
|
|
|
|
156
|
|
|
39
|
|
|
|
|
1010
|
|
10
|
39
|
|
|
39
|
|
422
|
use Mail::ListDetector::Detector::RFC2919; |
|
39
|
|
|
|
|
80
|
|
|
39
|
|
|
|
|
2401
|
|
11
|
39
|
|
|
39
|
|
202
|
use Carp; |
|
39
|
|
|
|
|
65
|
|
|
39
|
|
|
|
|
5918
|
|
12
|
|
|
|
|
|
|
|
13
|
35
|
|
|
35
|
0
|
151
|
sub DEBUG { 0 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub match { |
16
|
35
|
|
|
35
|
1
|
79
|
my $self = shift; |
17
|
35
|
|
|
|
|
88
|
my $message = shift; |
18
|
35
|
50
|
|
|
|
137
|
print "Got message $message\n" if DEBUG; |
19
|
35
|
50
|
|
|
|
143
|
carp ("Mail::ListDetector::Detector::GoogleGroups - no message supplied") unless defined($message); |
20
|
39
|
|
|
39
|
|
245
|
use Email::Abstract; |
|
39
|
|
|
|
|
82
|
|
|
39
|
|
|
|
|
7401
|
|
21
|
|
|
|
|
|
|
|
22
|
35
|
|
|
|
|
174
|
my $x_google_loop = Email::Abstract->get_header($message, 'X-Google-Loop'); |
23
|
35
|
100
|
|
|
|
2366
|
if (defined($x_google_loop)) { |
24
|
1
|
|
|
|
|
13
|
my $rfc2919 = new Mail::ListDetector::Detector::RFC2919; |
25
|
1
|
|
|
|
|
6
|
my $list = $rfc2919->match($message); |
26
|
1
|
50
|
|
|
|
5
|
unless (defined ($list)) { |
27
|
0
|
|
|
|
|
0
|
return undef; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
5
|
$list->listsoftware ('Google Groups'); |
31
|
1
|
|
|
|
|
8
|
my $listname = $list->listname; |
32
|
1
|
|
|
|
|
7
|
$listname =~ s/\.googlegroups\.com$//; |
33
|
1
|
|
|
|
|
5
|
$list->listname ($listname); |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
19
|
return $list; |
36
|
|
|
|
|
|
|
} else { |
37
|
34
|
|
|
|
|
475
|
return undef; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |