SFDC/Role/Exception.pm

filter: Statementstmt 79.3% 23 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 100% 1 / 1 totaltotal 75.6% 31 / 41 CC 2 SCAR 7.4
CC
2
Cov
74%
throw
6.0
_stringify
2.0
BEGIN
1.0
CRAP 2.1
« SFDC/Apex/ExecuteAnonymousResult.pm ↑ Summary SFDC/Apex.pm »
1 package WWW::SFDC::Role::Exception;
2 # ABSTRACT: Exception role for WWW::SFDC libraries
3  
4 5 ▶use 5.12.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 our $VERSION = '0.36'; # TRIAL VERSION
9  
10 5 ▶use Log::Log4perl ':easy';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 5 ▶use Scalar::Util 'blessed';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 5 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 5 ▶use overload '""' => \&_stringify;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16  
17 5 has 'message',
18 is => 'ro',
19 default => 'There was an error in WWW::SFDC';
20  
21 0 ▶sub _stringify {
Subroutine _stringify: not called CC=1 SCAR=6.9
22 0 my ($self) = shift;
23 0 return $self->message;
24 }
25  
26  
27 0 ▶sub throw {
Subroutine throw: not called CC=2 SCAR=17.9
Pod documented
28 0 my $self = shift;
29 0 ▶ my $e = blessed $self ? $self : $self->new(@_);
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($self) ? : 0 0 0
30  
31 0 FATAL $e;
32 0 die $e;
33 }
34  
35 5 1;
36  
37 __END__
« SFDC/Apex/ExecuteAnonymousResult.pm ↑ Summary SFDC/Apex.pm »