| 1 | package Email::Send::NNTP; | ||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 4 | ▶ | use vars qw[$NNTP $VERSION]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 4 | ▶ | use Net::NNTP; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | BEGIN { | ||||||||||
| 7 | 4 | ▶ | local $Return::Value::NO_CLUCK = 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 4 | require Return::Value; | |||||||||
| 9 | 4 | Return::Value->import; | |||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | 4 | $VERSION = '2.201'; | |||||||||
| 13 | |||||||||||
| 14 | sub is_available { | ||||||||||
| 15 | 1 | ▶ | return eval { require Net::NNTP } | ||||||||
|
Subroutine
is_available: called CC=2 SCAR=7.2
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 16 | ? success | ||||||||||
| 17 | : failure $@; | ||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | sub send { | ||||||||||
| 21 | 0 | ▶ | my ($class, $message, @args) = @_; | ||||||||
|
Subroutine
send: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||
| 22 | 0 | eval { require Net::NNTP }; | |||||||||
| 23 | 0 | ▶ | if ( @_ > 1 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 0 | ▶ | $NNTP->quit if $NNTP; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 0 | $NNTP = Net::NNTP->new(@args); | |||||||||
| 26 | 0 | ▶ | return failure unless $NNTP; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | } | ||||||||||
| 28 | 0 | ▶ | return failure unless $NNTP->post( $message->as_string ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | return success; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | sub DESTROY { | ||||||||||
| 33 | 0 | ▶ | $NNTP->quit if $NNTP; | ||||||||
|
Subroutine
DESTROY: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 4 | 1; | |||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||