use
strict;
use
warnings;
our
@EXPORT
=
qw/DTF/
;
my
$DTF
;
sub
DTF {
return
$DTF
if
$DTF
;
confess
"You must first load a Test2::Harness::UI::Schema::NAME module"
unless
$Test2::Harness::UI::Schema::LOADED
;
if
(
$Test2::Harness::UI::Schema::LOADED
=~ m/postgresql/i) {
return
$DTF
=
'DateTime::Format::Pg'
;
}
if
(
$Test2::Harness::UI::Schema::LOADED
=~ m/mysql/i) {
return
$DTF
=
'DateTime::Format::MySQL'
;
}
die
"Not sure what DateTime::Formatter to use"
;
}
1;