projects
/
dbsrgits/DBIx-Class-Historic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
2554693
)
minor optimization
Rafael Kitover [Sat, 11 Jul 2009 12:36:53 +0000 (12:36 +0000)]
lib/DBIx/Class/Storage/DBI.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/DBIx/Class/Storage/DBI.pm
b/lib/DBIx/Class/Storage/DBI.pm
index
6f66848
..
a017ff3
100644
(file)
--- a/
lib/DBIx/Class/Storage/DBI.pm
+++ b/
lib/DBIx/Class/Storage/DBI.pm
@@
-716,7
+716,11
@@
Returns the dbh - a data base handle of class L<DBI>.
sub dbh {
my ($self) = @_;
- $self->ensure_connected;
+ if (not $self->_dbh) {
+ $self->_populate_dbh;
+ } else {
+ $self->ensure_connected;
+ }
return $self->_dbh;
}