X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSQLAnywhere.pm;h=9cdd038c86cfbee20ee88e11dec1a4236b99089e;hb=63a18cfe04b404ec09424385980b03e439f36d0c;hp=cbc07d5c016449a7b8b15982f7d01a0784af5a27;hpb=ac4e80df285f09b6540f8009b95de463b3615cd1;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm b/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm index cbc07d5..9cdd038 100644 --- a/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm +++ b/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm @@ -139,15 +139,14 @@ sub select_single { sub build_datetime_parser { my $self = shift; - my $type = "DateTime::Format::Strptime"; try { - eval "require ${type}" + require DateTime::Format::Strptime; } catch { - $self->throw_exception("Couldn't load ${type}: $_"); + $self->throw_exception("Couldn't load DateTime::Format::Strptime: $_"); }; - return $type->new( pattern => '%Y-%m-%d %H:%M:%S.%6N' ); + return DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M:%S.%6N' ); } =head2 connect_call_datetime_setup