| 1 | package SQL::Composer; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | our $VERSION = '0.17'; | |
| 7 | |||
| 8 | 2 | ▶ | use base 'Exporter'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | our @EXPORT_OK = qw(sql_select sql_insert sql_delete sql_update sql_upsert); | |
| 11 | 2 | our %EXPORT_TAGS = (funcs => [qw(sql_select sql_insert sql_delete sql_update sql_upsert)]); | |
| 12 | |||
| 13 | 2 | require Carp; | |
| 14 | 2 | ▶ | use SQL::Composer::Select; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 2 | ▶ | use SQL::Composer::Insert; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 2 | ▶ | use SQL::Composer::Delete; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 2 | ▶ | use SQL::Composer::Update; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 2 | ▶ | use SQL::Composer::Upsert; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 2 | $Carp::Internal{(__PACKAGE__)}++; | |
| 21 | 2 | $Carp::Internal{"SQL::Composer::$_"}++ for qw/ | |
| 22 | Select | ||
| 23 | Insert | ||
| 24 | Delete | ||
| 25 | Update | ||
| 26 | Upsert | ||
| 27 | Expression | ||
| 28 | Join | ||
| 29 | Quoter | ||
| 30 | /; | ||
| 31 | |||
| 32 | sub build { | ||
| 33 | 5 | ▶ | my $class = shift; |
|
Subroutine
build: called CC=1 SCAR=0.0
Pod
documented
| |||
| 34 | 5 | my ($name) = shift; | |
| 35 | |||
| 36 | 5 | my $class_name = 'SQL::Composer::' . ucfirst($name); | |
| 37 | 5 | return $class_name->new(@_); | |
| 38 | } | ||
| 39 | |||
| 40 | 1 | ▶ | sub sql_select { build(__PACKAGE__, 'select', @_) } |
|
Subroutine
sql_select: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 41 | 1 | ▶ | sub sql_insert { build(__PACKAGE__, 'insert', @_) } |
|
Subroutine
sql_insert: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 42 | 1 | ▶ | sub sql_update { build(__PACKAGE__, 'update', @_) } |
|
Subroutine
sql_update: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 43 | 1 | ▶ | sub sql_delete { build(__PACKAGE__, 'delete', @_) } |
|
Subroutine
sql_delete: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 44 | 0 | ▶ | sub sql_upsert { build(__PACKAGE__, 'upsert', @_) } |
|
Subroutine
sql_upsert: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 45 | |||
| 46 | 2 | 1; | |
| 47 | __END__ | ||