Send/Sendmail.pm

filter: Statementstmt 64.7% 11 / 17 Branchbran 0.0% 0 / 4 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 48.3% 15 / 31 CC 3 SCAR 13.5
CC
3
Cov
52%
is_available
6.0
send
6.0
BEGIN
1.0
CRAP 3.9
« Send/Qmail.pm ↑ Summary
1 package Email::Send::Sendmail;
2 # $Id: Sendmail.pm,v 1.4 2005/05/11 03:01:26 cwest Exp $
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use Return::Value;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use vars qw[$SENDMAIL];
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶$SENDMAIL ||= q[sendmail];
Condition50%1/2
$Email::Send::Sendmail::SENDMAIL ||= "sendmail"
l!l
01
MC/DC0%0/1
$Email::Send::Sendmail::SENDMAIL ||= "sendmail"
$Email::Send::Sendmail::SENDMAIL
Truth table50%1/2
A
A= $Email::Send::Sendmail::SENDMAIL
Aresult
11
00
9  
10 sub is_available {
11 0 ▶ return `which $SENDMAIL`
Subroutine is_available: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
`which $Email::Send::Sendmail::SENDMAIL` ? : 0 0 0
12 ? success
13 : failure;
14 }
15  
16 sub send {
17 0 ▶ my ($class, $message, @args) = @_;
Subroutine send: not called CC=2 SCAR=17.9
Pod undocumented
18 0 ▶ open SENDMAIL, "| $SENDMAIL -t -oi @args" or return failure;
Branch: 1 branch
BranchTrueFalseTotal
open SENDMAIL, "| $Email::Send::Sendmail::SENDMAIL -t -oi @args" or return failure() 0 0 0
19 0 print SENDMAIL $message->as_string;
20 0 close SENDMAIL;
21 0 return success;
22 }
23  
24 1 1;
25  
26 __END__
« Send/Qmail.pm ↑ Summary