Errors.pm

filter: Statementstmt 73.6% 14 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 2 totaltotal 60.0% 18 / 30 CC 2 SCAR 8.7
CC
2
Cov
67%
error_code
6.0
praxo_error
2.0
BEGIN
1.0
CRAP 2.4
« Adapters/Retriever.pm ↑ Summary Core.pm »
1 package Praxo::Errors;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our @EXPORT_OK = qw(praxo_error error_code);
8  
9 0 ▶sub praxo_error {
Subroutine praxo_error: not called CC=1 SCAR=6.9
Pod undocumented
10 0 my ($code, $message) = @_;
11 0 die bless { code => $code, message => $message }, 'Praxo::Errors::Error';
12 }
13  
14 0 ▶sub error_code {
Subroutine error_code: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my ($error) = @_;
16 0 ▶ return ref($error) eq 'Praxo::Errors::Error' ? $error->{code} : '';
Branch: 1 branch
BranchTrueFalseTotal
ref $error eq 'Praxo::Errors::Error' ? : 0 0 0
17 }
18  
19 package Praxo::Errors::Error;
20  
21 0 ▶use overload '""' => sub { $_[0]->{message} }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine __ANON__: not called CC=1 SCAR=0.2
22  
23 1 1;
« Adapters/Retriever.pm ↑ Summary Core.pm »