line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 5.004; |
4
|
12
|
|
|
12
|
|
730
|
use strict; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
4717
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Mail::IspMailGate::Config; |
8
|
|
|
|
|
|
|
require MIME::Parser; |
9
|
|
|
|
|
|
|
require File::Basename; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Mail::IspMailGate::Parser; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$Mail::IspMailGate::Parser::VERSION = '0.01'; |
15
|
|
|
|
|
|
|
@Mail::IspMailGate::Parser::ISA = qw(MIME::Parser); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new ($$) { |
18
|
12
|
|
|
12
|
1
|
1140
|
my $class = shift; my %attr = @_; |
|
12
|
|
|
|
|
66
|
|
19
|
12
|
|
66
|
|
|
63
|
$attr{'output_dir'} ||= $Mail::IspMailGate::Config::config->{'tmp_dir'}; |
20
|
12
|
|
50
|
|
|
89
|
$attr{'output_prefix'} ||= 'part'; |
21
|
12
|
|
50
|
|
|
87
|
$attr{'output_to_core'} ||= 'NONE'; |
22
|
12
|
|
|
|
|
187
|
$class->SUPER::new(%attr); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub output_path ($$) { |
26
|
34
|
|
|
34
|
1
|
50683202
|
my($self, $head) = @_; |
27
|
34
|
|
|
|
|
298
|
my($path) = $self->SUPER::output_path($head); |
28
|
34
|
|
|
|
|
47782
|
my($i) = 0; |
29
|
34
|
|
|
|
|
80
|
my($opath) = $path; |
30
|
34
|
|
|
|
|
446
|
while (-f $path) { |
31
|
0
|
|
|
|
|
0
|
$path = File::Basename::dirname($opath) . "/$i" . |
32
|
|
|
|
|
|
|
File::Basename::basename($opath); |
33
|
0
|
|
|
|
|
0
|
++$i; |
34
|
|
|
|
|
|
|
} |
35
|
34
|
|
|
|
|
155
|
$path; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |