line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Email::Send::NNTP; |
2
|
2
|
|
|
2
|
|
2222
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
10
|
use vars qw[$NNTP $VERSION]; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
105
|
|
5
|
2
|
|
|
2
|
|
4347
|
use Net::NNTP; |
|
2
|
|
|
|
|
97753
|
|
|
2
|
|
|
|
|
178
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
2
|
|
|
2
|
|
5
|
local $Return::Value::NO_CLUCK = 1; |
8
|
2
|
|
|
|
|
25
|
require Return::Value; |
9
|
2
|
|
|
|
|
477
|
Return::Value->import; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
$VERSION = '2.199'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub is_available { |
15
|
1
|
50
|
|
1
|
0
|
2
|
return eval { require Net::NNTP } |
|
1
|
|
|
|
|
12
|
|
16
|
|
|
|
|
|
|
? success |
17
|
|
|
|
|
|
|
: failure $@; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub send { |
21
|
0
|
|
|
0
|
0
|
|
my ($class, $message, @args) = @_; |
22
|
0
|
|
|
|
|
|
eval { require Net::NNTP }; |
|
0
|
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
|
if ( @_ > 1 ) { |
24
|
0
|
0
|
|
|
|
|
$NNTP->quit if $NNTP; |
25
|
0
|
|
|
|
|
|
$NNTP = Net::NNTP->new(@args); |
26
|
0
|
0
|
|
|
|
|
return failure unless $NNTP; |
27
|
|
|
|
|
|
|
} |
28
|
0
|
0
|
|
|
|
|
return failure unless $NNTP->post( $message->as_string ); |
29
|
0
|
|
|
|
|
|
return success; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub DESTROY { |
33
|
0
|
0
|
|
0
|
|
|
$NNTP->quit if $NNTP; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |