From: Peter Rabbitson Date: Fri, 4 Sep 2009 06:47:19 +0000 (+0000) Subject: Stop connecting to determine dt-parser (test is in pg branch) X-Git-Tag: v0.08111~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3af878c5abe85f13ff0cc4ea672c33901e35b39c;p=dbsrgits%2FDBIx-Class.git Stop connecting to determine dt-parser (test is in pg branch) --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index a679dfe..af54f1c 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -2487,7 +2487,6 @@ Returns the datetime parser class sub datetime_parser { my $self = shift; return $self->{datetime_parser} ||= do { - $self->_populate_dbh unless $self->_dbh; $self->build_datetime_parser(@_); }; } @@ -2508,6 +2507,11 @@ See L =cut sub build_datetime_parser { + if (not $_[0]->_driver_determined) { + $_[0]->_determine_driver; + goto $_[0]->can('build_datetime_parser'); + } + my $self = shift; my $type = $self->datetime_parser_type(@_); $self->ensure_class_loaded ($type);