[Bast-commits] r7033 -
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Jul 11 12:36:54 GMT 2009
Author: caelum
Date: 2009-07-11 12:36:53 +0000 (Sat, 11 Jul 2009)
New Revision: 7033
Modified:
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
Log:
minor optimization
Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm 2009-07-11 11:07:41 UTC (rev 7032)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm 2009-07-11 12:36:53 UTC (rev 7033)
@@ -716,7 +716,11 @@
sub dbh {
my ($self) = @_;
- $self->ensure_connected;
+ if (not $self->_dbh) {
+ $self->_populate_dbh;
+ } else {
+ $self->ensure_connected;
+ }
return $self->_dbh;
}
More information about the Bast-commits
mailing list