lib/Data/Validation/Constants.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 32 / 32 CC 3 SCAR 5.6
CC
3
Cov
100%
Exception_Class
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« lib/Data/Validation/Exception.pm ↑ Summary lib/Data/Validation/Filters.pm »
1 package Data::Validation::Constants;
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 parent 'Exporter::Tiny';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Data::Validation::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our @EXPORT = qw( EXCEPTION_CLASS FALSE HASH NUL SPC TRUE );
10  
11 1 my $Exception_Class = 'Data::Validation::Exception';
12  
13 57 ▶sub EXCEPTION_CLASS () { __PACKAGE__->Exception_Class }
Subroutine EXCEPTION_CLASS: called CC=1 SCAR=0.0
Pod documented
14 sub FALSE () { 0 }
15 sub HASH () { 'HASH' }
16 sub NUL () { q() }
17 sub SPC () { q( ) }
18 sub TRUE () { 1 }
19  
20 59 ▶sub Exception_Class {
Subroutine Exception_Class: called CC=3 SCAR=11.0
Pod documented
21 59 ▶ my ($self, $class) = @_; defined $class or return $Exception_Class;
Branch: 1 branch
BranchTrueFalseTotal
defined $class or return $Exception_Class 2 57 59
22  
23 2 ▶ $class->can( 'throw' )
Branch: 1 branch
BranchTrueFalseTotal
$class->can("throw") or die "Class '${class}' is not loaded or has no 'throw' method" 1 1 2
24 or die "Class '${class}' is not loaded or has no 'throw' method";
25  
26 1 return $Exception_Class = $class;
27 }
28  
29 1 1;
30  
31 __END__
« lib/Data/Validation/Exception.pm ↑ Summary lib/Data/Validation/Filters.pm »