Atom/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
« Atom/Client.pm ↑ Summary Atom/Server.pm »
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] || ''
l!l
00
MC/DC0%0/1
$_[1] || ''
$_[1]
Truth table0%0/2
A
A= $_[1]
Aresult
11
00
11 0 ▶ $msg .= "\n" unless $msg =~ /\n$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $msg =~ /\n$/ 0 0 0
12 0 ▶ if (ref($_[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[0]) { } 0 0 0
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
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
20  
21 23 1;
« Atom/Client.pm ↑ Summary Atom/Server.pm »