| 1 | # $Id: ErrorHandler.pm,v 1.1 2003/09/08 00:00:50 btrott Exp $ | ||||||||||||
| 2 | |||||||||||||
| 3 | package XML::Atom::ErrorHandler; | ||||||||||||
| 4 | 23 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 23 | ▶ | use vars qw( $ERROR ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 0 | ▶ | sub new { bless {}, shift } | ||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 9 | 0 | ▶ | sub error { | ||||||||||
|
Subroutine
error: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||
| 10 | 0 | ▶ | my $msg = $_[1] || ''; | ||||||||||
|
Condition0%0/2
$_[1] || ''
MC/DC0%0/1
$_[1] || ''
$_[1]
Truth table0%0/2
A
A= $_[1]
| |||||||||||||
| 11 | 0 | ▶ | $msg .= "\n" unless $msg =~ /\n$/; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 12 | 0 | ▶ | if (ref($_[0])) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 13 | 0 | $_[0]->{_errstr} = $msg; | |||||||||||
| 14 | } else { | ||||||||||||
| 15 | 0 | $ERROR = $msg; | |||||||||||
| 16 | } | ||||||||||||
| 17 | 0 | return; | |||||||||||
| 18 | } | ||||||||||||
| 19 | 0 | ▶ | sub errstr { ref($_[0]) ? $_[0]->{_errstr} : $ERROR } | ||||||||||
|
Subroutine
errstr: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||||
| 20 | |||||||||||||
| 21 | 23 | 1; | |||||||||||