| 1 | package Date::Transform::Constants; | ||
| 2 | 1 | our $VERSION = '0.09'; | |
| 3 | |||
| 4 | 1 | ▶ | use 5.006; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | require Exporter; | |
| 8 | 1 | our @ISA = qw(Exporter); | |
| 9 | |||
| 10 | # 2. General Method | ||
| 11 | 1 | my @CONSTANTS = qw( | |
| 12 | MYSQL_DATETIME | ||
| 13 | MYSQL_DATE | ||
| 14 | MYSQL_TIME | ||
| 15 | MYSQL_TIMESTAMP | ||
| 16 | ); | ||
| 17 | |||
| 18 | ### DECLARE DATATYPE CONSTANTS ### | ||
| 19 | 1 | ▶ | use constant MYSQL_DATETIME => '%Y-%m-%d %T'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | 1 | ▶ | use constant MYSQL_DATE => '%Y-%m-%d'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 1 | ▶ | use constant MYSQL_TIME => '%T'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 1 | ▶ | use constant MYSQL_TIMESTAMP => '%Y-%m-%d %T'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | # Items to export into callers namespace by default. Note: do not export | ||
| 25 | # names by default without a very good reason. Use EXPORT_OK instead. | ||
| 26 | # Do not simply export all your public functions/methods/constants. | ||
| 27 | |||
| 28 | # This allows declaration | ||
| 29 | # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK | ||
| 30 | # will save memory. | ||
| 31 | 1 | our %EXPORT_TAGS = ( 'all' => [qw()] ); | |
| 32 | 1 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |
| 33 | 1 | our @EXPORT = (@CONSTANTS); | |
| 34 | |||
| 35 | 1 | 1; | |
| 36 | |||
| 37 | __END__ | ||