| 1 | package File::DataClass::Constants; | ||||||||||
| 2 | |||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 7 | ▶ | use Exporter 5.57 qw( import ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 7 | ▶ | use File::DataClass::Exception; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 7 | our @EXPORT = qw( ARRAY CODE CYGWIN EXCEPTION_CLASS FALSE HASH LANG | |||||||||
| 10 | LOCALIZE LOCK_BLOCKING LOCK_NONBLOCKING MSOFT NO_UMASK_STACK | ||||||||||
| 11 | NUL PERMS SPC STAT_FIELDS STORAGE_BASE STORAGE_EXCEPTIONS | ||||||||||
| 12 | TILDE TRUE ); | ||||||||||
| 13 | |||||||||||
| 14 | 7 | my $_exception_class = 'File::DataClass::Exception'; | |||||||||
| 15 | |||||||||||
| 16 | sub ARRAY () { 'ARRAY' } | ||||||||||
| 17 | sub CODE () { 'CODE' } | ||||||||||
| 18 | sub CYGWIN () { 'cygwin' } | ||||||||||
| 19 | sub FALSE () { 0 } | ||||||||||
| 20 | sub HASH () { 'HASH' } | ||||||||||
| 21 | sub LANG () { 'en' } | ||||||||||
| 22 | sub LOCALIZE () { '[_' } | ||||||||||
| 23 | sub MSOFT () { 'mswin32' } | ||||||||||
| 24 | sub NUL () { q() } | ||||||||||
| 25 | sub PERMS () { oct '0640' } | ||||||||||
| 26 | sub SPC () { ' ' } | ||||||||||
| 27 | sub TILDE () { '~' } | ||||||||||
| 28 | sub TRUE () { 1 } | ||||||||||
| 29 | |||||||||||
| 30 | 72 | ▶ | sub EXCEPTION_CLASS () { __PACKAGE__->Exception_Class } | ||||||||
|
Subroutine
EXCEPTION_CLASS: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 31 | sub LOCK_BLOCKING () { 1 } | ||||||||||
| 32 | sub LOCK_NONBLOCKING () { 2 } | ||||||||||
| 33 | sub NO_UMASK_STACK () { -1 } | ||||||||||
| 34 | 346 | ▶ | sub STAT_FIELDS () { qw( device inode mode nlink uid gid device_id | ||||||||
|
Subroutine
STAT_FIELDS: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 35 | size atime mtime ctime blksize blocks ) } | ||||||||||
| 36 | sub STORAGE_BASE () { 'File::DataClass::Storage' } | ||||||||||
| 37 | sub STORAGE_EXCEPTIONS () { 'File::DataClass::Storage::WithLanguage' } | ||||||||||
| 38 | |||||||||||
| 39 | 74 | ▶ | sub Exception_Class { | ||||||||
|
Subroutine
Exception_Class: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 40 | 74 | ▶ | my ($self, $class) = @_; defined $class or return $_exception_class; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | |||||||||||
| 42 | 2 | ▶ | $class->can( 'throw' ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | or die "Class '${class}' is not loaded or has no 'throw' method"; | ||||||||||
| 44 | |||||||||||
| 45 | 1 | return $_exception_class = $class; | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 7 | 1; | |||||||||
| 49 | |||||||||||
| 50 | __END__ | ||||||||||