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