| 1 | package Email::Send::IO; | ||||||||||
| 2 | # $Id: IO.pm,v 1.3 2005/05/11 03:01:25 cwest Exp $ | ||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use UNIVERSAL::require; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Return::Value; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use vars qw[@IO]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | @IO = ('=') unless @IO; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | |||||||||||
| 11 | sub is_available { | ||||||||||
| 12 | 0 | ▶ | return IO::All->require | ||||||||
|
Subroutine
is_available: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 13 | ? success | ||||||||||
| 14 | : failure $UNIVERSAL::require::ERROR; | ||||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | sub send { | ||||||||||
| 18 | 0 | ▶ | my ($class, $message, @args) = @_; | ||||||||
|
Subroutine
send: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 19 | 0 | ▶ | IO::All->require or return failure; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | IO::All->import; | |||||||||
| 21 | 0 | ▶ | @args = (@IO) unless @args; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | eval {io(@args)->print($message->as_string)}; | |||||||||
| 23 | 0 | ▶ | return failure $@ if $@; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 0 | return success; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 1 | 1; | |||||||||
| 28 | |||||||||||
| 29 | __END__ | ||||||||||