| 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
| |||||||||||
| 22 | |||||||||||
| 23 | 2 | ▶ | $class->can( 'throw' ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||