Skilletor/Error.pm

filter: Statementstmt 89.4% 17 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 1 / 1 totaltotal 82.7% 24 / 29 CC 2 SCAR 4.2
CC
2
Cov
86%
throw
2.1
__ANON__
2.0
__ANON__
2.0
CRAP 1.5
« Skilletor/JSON/OrderedHash.pm ↑ Summary Skilletor/Cache.pm »
1 package Skilletor::Error;
2 # ABSTRACT: Exception base class of Skilletor
3  
4 248 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 248 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 use overload
7 0 ▶ '""' => sub { $_[0]->message },
Subroutine BEGIN: called CC=1 SCAR=0.6
Subroutine __ANON__: not called CC=1 SCAR=6.9
8 0 ▶ 'bool' => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
9 248 fallback => 1;
10 248 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 248 our $VERSION = '0.001';
13  
14 248 has message => (
15 is => 'ro',
16 required => 1,
17 );
18  
19 4319 ▶sub throw {
Subroutine throw: called CC=2 SCAR=7.2
Pod documented
20 4319 my ( $class, @args ) = @_;
21 4319 ▶ croak( $class->new( @args == 1 ? ( message => $args[0] ) : @args ) );
Branch: 1 branch
BranchTrueFalseTotal
@args == 1 ? : 4319 0 4319
22 }
23  
24 248 1;
25  
26 __END__
« Skilletor/JSON/OrderedHash.pm ↑ Summary Skilletor/Cache.pm »