FOAF/ErrorHandler.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 3 totaltotal 28.1% 9 / 32 CC 5 SCAR 23.7
CC
5
Cov
30%
error
20.0
errstr
6.0
new
2.0
CRAP 10.7
↑ Summary FOAF/Person.pm »
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] || ''
l!l
00
MC/DC0%0/1
$_[1] || ''
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
9 0 ▶ $msg .= "\n" unless $msg =~ /\n$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $msg =~ /\n$/ 0 0 0
10 0 ▶ if (ref($_[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[0]) { } 0 0 0
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
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
18  
19 5 1;
↑ Summary FOAF/Person.pm »