| 1 | package Web::ComposableRequest::Constants; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strictures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use parent 'Exporter::Tiny'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Web::ComposableRequest::Exception; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use Role::Tiny (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | our @EXPORT = qw( COMMA EXCEPTION_CLASS FALSE LANG NUL SPC TRUE ); | |||||||||
| 10 | |||||||||||
| 11 | 1 | my $Exception_Class = 'Web::ComposableRequest::Exception'; | |||||||||
| 12 | |||||||||||
| 13 | sub COMMA () { q(,) } | ||||||||||
| 14 | sub FALSE () { 0 } | ||||||||||
| 15 | sub LANG () { 'en' } | ||||||||||
| 16 | sub NUL () { q() } | ||||||||||
| 17 | sub SPC () { q( ) } | ||||||||||
| 18 | sub TRUE () { 1 } | ||||||||||
| 19 | |||||||||||
| 20 | 2 | ▶ | sub EXCEPTION_CLASS () { __PACKAGE__->Exception_Class } | ||||||||
|
Subroutine
EXCEPTION_CLASS: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 21 | |||||||||||
| 22 | 6 | ▶ | sub Exception_Class { | ||||||||
|
Subroutine
Exception_Class: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 23 | 6 | ▶ | my ($self, $class) = @_; defined $class or return $Exception_Class; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | 2 | ▶ | $class->can( 'throw' ) or $Exception_Class->throw | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | ( "Exception class ${class} is not loaded or has no throw method" ); | ||||||||||
| 27 | |||||||||||
| 28 | 1 | return $Exception_Class = $class; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 1 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||