| 1 | package DBIx::Class::Storage::DBI::ODBC::OPENEDGE; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | our $VERSION = '0.02'; | |||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | ▶ | use base qw/ | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | DBIx::Class::Storage::DBI::ODBC | ||||||||||||||||||||
| 10 | DBIx::Class::Storage::DBI::OpenEdge | ||||||||||||||||||||
| 11 | 1 | /; | |||||||||||||||||||
| 12 | 1 | ▶ | use mro 'c3'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 0 | ▶ | sub datetime_parser_type { | ||||||||||||||||||
|
Subroutine
datetime_parser_type: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 15 | 0 | 'DBIx::Class::Storage::DBI::ODBC::OPENEDGE::DateTime::Format' | |||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | package # hide from PAUSE | ||||||||||||||||||||
| 19 | DBIx::Class::Storage::DBI::ODBC::OPENEDGE::DateTime::Format; | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 1 | my $datetime_format = '%Y-%m-%d %H:%M:%S'; # %F %T, no fractional part | |||||||||||||||||||
| 22 | 1 | my $datetime_parser; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | ▶ | sub parse_datetime { | ||||||||||||||||||
|
Subroutine
parse_datetime: not called CC=2 SCAR=17.9
| |||||||||||||||||||||
| 25 | 0 | shift; | |||||||||||||||||||
| 26 | 0 | require DateTime::Format::Strptime; | |||||||||||||||||||
| 27 | 0 | ▶ | $datetime_parser ||= DateTime::Format::Strptime->new( | ||||||||||||||||||
|
Condition0%0/3
$datetime_parser ||= "DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
MC/DC0%0/2
$datetime_parser ||= "DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
$datetime_parser
"DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
Truth table0%0/3
A ||= B
A= $datetime_parserB= "DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
| |||||||||||||||||||||
| 28 | pattern => $datetime_format, | ||||||||||||||||||||
| 29 | on_error => 'croak', | ||||||||||||||||||||
| 30 | ); | ||||||||||||||||||||
| 31 | 0 | return $datetime_parser->parse_datetime(shift); | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 0 | ▶ | sub format_datetime { | ||||||||||||||||||
|
Subroutine
format_datetime: not called CC=2 SCAR=17.9
| |||||||||||||||||||||
| 35 | 0 | shift; | |||||||||||||||||||
| 36 | 0 | require DateTime::Format::Strptime; | |||||||||||||||||||
| 37 | 0 | ▶ | $datetime_parser ||= DateTime::Format::Strptime->new( | ||||||||||||||||||
|
Condition0%0/3
$datetime_parser ||= "DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
MC/DC0%0/2
$datetime_parser ||= "DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
$datetime_parser
"DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
Truth table0%0/3
A ||= B
A= $datetime_parserB= "DateTime::Format::Strptime"->new("pattern", $datetime_format, "on_error", "croak")
| |||||||||||||||||||||
| 38 | pattern => $datetime_format, | ||||||||||||||||||||
| 39 | on_error => 'croak', | ||||||||||||||||||||
| 40 | ); | ||||||||||||||||||||
| 41 | 0 | return $datetime_parser->format_datetime(shift); | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 1 | 1; | |||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | __END__ | ||||||||||||||||||||