line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Email::Blaster::Config; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
75
|
|
5
|
2
|
|
|
2
|
|
12
|
use warnings 'all'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
96
|
|
6
|
2
|
|
|
2
|
|
11
|
use base 'Email::Blaster::ConfigNode'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
401
|
|
7
|
2
|
|
|
2
|
|
97
|
use Carp 'confess'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
464
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#============================================================================== |
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
0
|
|
|
0
|
0
|
|
my ($class, $ref, $root) = @_; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my $s = $class->SUPER::new( $ref ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Add our "libs" directories to @INC: |
18
|
|
|
|
|
|
|
map { |
19
|
0
|
|
|
|
|
|
$_ =~ s/\@ServerRoot@/$root/; |
20
|
0
|
|
|
|
|
|
push @INC, $_; |
21
|
0
|
|
|
|
|
|
} @{ $s->libs->lib }; |
|
0
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $s; |
24
|
|
|
|
|
|
|
}# end new() |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#============================================================================== |
28
|
|
|
|
|
|
|
sub _init |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
|
|
my ($s) = @_; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Make sure we can load all of our handlers: |
33
|
0
|
|
|
|
|
|
local $SIG{__DIE__} = \&Carp::confess; |
34
|
0
|
|
|
|
|
|
map { $s->_load_class( $_ ) } @{ $s->handlers->server_startup->handler }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
map { $s->_load_class( $_ ) } @{ $s->handlers->server_shutdown->handler }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
map { $s->_load_class( $_ ) } @{ $s->handlers->init_transmission->handler }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
map { $s->_load_class( $_ ) } @{ $s->handlers->begin_transmission->handler }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
map { $s->_load_class( $_ ) } @{ $s->handlers->end_transmission->handler }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
map { $s->_load_class( $_ ) } @{ $s->handlers->message_bounced->handler }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
}# end _init() |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
#============================================================================== |
44
|
|
|
|
|
|
|
sub throttled |
45
|
|
|
|
|
|
|
{ |
46
|
0
|
|
|
0
|
0
|
|
my $s = shift; |
47
|
|
|
|
|
|
|
|
48
|
0
|
0
|
|
|
|
|
return wantarray ? @{[ $s->{throttled}->throttle ]} : $s->{throttled}->throttle; |
|
0
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
}# end throttled() |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
#============================================================================== |
53
|
|
|
|
|
|
|
sub _load_class |
54
|
|
|
|
|
|
|
{ |
55
|
0
|
|
|
0
|
|
|
my ($s, $class) = @_; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
(my $file = "$class.pm") =~ s/::/\//g; |
58
|
0
|
0
|
|
|
|
|
eval { require $file unless $INC{$file}; 1 } or confess "Cannot load $class: $@"; |
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
}# end _load_class() |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
#============================================================================== |
63
|
|
|
|
|
|
|
sub DESTROY |
64
|
|
|
|
|
|
|
{ |
65
|
0
|
|
|
0
|
|
|
my $s = shift; |
66
|
0
|
|
|
|
|
|
undef(%$s); |
67
|
|
|
|
|
|
|
}# end DESTROY() |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1;# return true: |
70
|
|
|
|
|
|
|
|