blib/lib/JQ/Lite/Error.pm

filter: Statementstmt 96.5% 28 / 29 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 92.3% 12 / 13 Podpod 50.0% 2 / 4 totaltotal 89.5% 43 / 48 CC 2 SCAR 2.0
CC
2
Cov
94%
new
2.0
category
2.0
BEGIN
1.0
CRAP 1.2
« blib/lib/JQ/Lite/Builtin/Encoding.pm ↑ Summary blib/lib/JQ/Lite/AST.pm »
1 package JQ::Lite::Error;
2  
3 182 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 182 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 182 ▶use overload '""' => 'as_string', fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 11 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
8 11 my ($class, %args) = @_;
9 11 ▶ my $message = defined $args{message} ? "$args{message}" : '';
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'message'} ? : 11 0 11
10 11 $message =~ s/\s+\z//;
11 11 return bless { message => $message }, $class;
12 }
13  
14 19 ▶sub message { return $_[0]->{message} }
Subroutine message: called CC=1 SCAR=0.0
Pod documented
15 0 ▶sub category { return 'unknown' }
Subroutine category: not called CC=1 SCAR=6.9
Pod documented
16 18 ▶sub as_string { return $_[0]->message }
Subroutine as_string: called CC=1 SCAR=0.0
Pod undocumented
17  
18 package JQ::Lite::Error::Input;
19 182 ▶use parent -norequire, 'JQ::Lite::Error';
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶sub category { return 'input' }
Subroutine category: called CC=1 SCAR=0.0
21  
22 package JQ::Lite::Error::Parse;
23 182 ▶use parent -norequire, 'JQ::Lite::Error';
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶sub category { return 'parse' }
Subroutine category: called CC=1 SCAR=0.0
25  
26 package JQ::Lite::Error::Evaluation;
27 182 ▶use parent -norequire, 'JQ::Lite::Error';
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶sub category { return 'evaluation' }
Subroutine category: called CC=1 SCAR=0.0
29  
30 182 1;
31  
32 __END__
« blib/lib/JQ/Lite/Builtin/Encoding.pm ↑ Summary blib/lib/JQ/Lite/AST.pm »