Send/NNTP.pm

filter: Statementstmt 61.5% 16 / 26 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 2 totaltotal 43.7% 21 / 48 CC 7 SCAR 25.5
CC
7
Cov
42%
send
30.0
is_available
6.0
DESTROY
6.0
CRAP 12.8
« Send.pm ↑ Summary Send/IO.pm »
1 package Email::Send::NNTP;
2 # $Id: NNTP.pm,v 1.2 2005/05/11 03:01:25 cwest Exp $
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use vars qw[$NNTP];
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Net::NNTP;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Return::Value;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use UNIVERSAL::require;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 sub is_available {
11 0 ▶ return Net::NNTP->require
Subroutine is_available: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
'Net::NNTP'->require ? : 0 0 0
12 ? success
13 : failure;
14 }
15  
16 sub send {
17 0 ▶ my ($class, $message, @args) = @_;
Subroutine send: not called CC=5 SCAR=34.0
Pod undocumented
18 0 Net::NNTP->require;
19 0 ▶ if ( @_ > 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ > 1) 0 0 0
20 0 ▶ $NNTP->quit if $NNTP;
Branch: 1 branch
BranchTrueFalseTotal
if $Email::Send::NNTP::NNTP 0 0 0
21 0 $NNTP = Net::NNTP->new(@args);
22 0 ▶ return failure unless $NNTP;
Branch: 1 branch
BranchTrueFalseTotal
unless $Email::Send::NNTP::NNTP 0 0 0
23 }
24 0 ▶ return failure unless $NNTP->post( $message->as_string );
Branch: 1 branch
BranchTrueFalseTotal
unless $Email::Send::NNTP::NNTP->post($message->as_string) 0 0 0
25 0 return success;
26 }
27  
28 sub DESTROY {
29 0 ▶ $NNTP->quit if $NNTP;
Subroutine DESTROY: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
if $Email::Send::NNTP::NNTP 0 0 0
30 }
31  
32 1 1;
33  
34 __END__
« Send.pm ↑ Summary Send/IO.pm »