| 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"
MC/DC0%0/1
$Email::Send::Sendmail::SENDMAIL ||= "sendmail"
$Email::Send::Sendmail::SENDMAIL
Truth table50%1/2
A
A= $Email::Send::Sendmail::SENDMAIL
| |||||||||||||
| 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
| |||||||||||||
| 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
| |||||||||||||
| 19 | 0 | print SENDMAIL $message->as_string; | |||||||||||
| 20 | 0 | close SENDMAIL; | |||||||||||
| 21 | 0 | return success; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | 1; | |||||||||||
| 25 | |||||||||||||
| 26 | __END__ | ||||||||||||