lib/Skilletor/Error.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 29 / 29 CC 2 SCAR 2.2
CC
2
Cov
100%
throw
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« /usr/local/lib/perl5/site_perl/5.44.0/namespace/clean/_Util.pm ↑ Summary /usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/BuildAll.pm »
1 package Skilletor::Error;
2 # ABSTRACT: Exception base class of Skilletor
3  
4 712 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 712 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 712 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 # After namespace::clean, not before: overload keeps its table as subs in this package ("((",
8 # "()", "(\"\"", "(bool"), and namespace::clean removes every sub that exists when it is used.
9 use overload
10 169 ▶ '""' => sub { $_[0]->message },
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
11 89 ▶ 'bool' => sub { 1 },
Subroutine __ANON__: called CC=1 SCAR=0.0
12 712 fallback => 1;
13  
14 712 our $VERSION = '0.008000';
15  
16 712 has message => (
17 is => 'ro',
18 required => 1,
19 );
20  
21 5525 ▶sub throw {
Subroutine throw: called CC=2 SCAR=6.9
Pod documented
22 5525 my ( $class, @args ) = @_;
23 5525 ▶ croak( $class->new( @args == 1 ? ( message => $args[0] ) : @args ) );
Branch: 1 branch
BranchTrueFalseTotal
@args == 1 ? : 5483 42 5525
24 }
25  
26 712 1;
27  
28 __END__
« /usr/local/lib/perl5/site_perl/5.44.0/namespace/clean/_Util.pm ↑ Summary /usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/BuildAll.pm »