From: Brandon L. Black Date: Wed, 15 Mar 2006 13:18:33 +0000 (+0000) Subject: >connection does nothing if storage defined and no arguments (which in turn makes... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e59d3e5b5d24f99fbba9352efdc8cca9aa21d21a;p=dbsrgits%2FDBIx-Class-Historic.git >connection does nothing if storage defined and no arguments (which in turn makes $schema->connect(undef) act like $schema->clone if already connected) --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index a50b26b..7e39162 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -340,6 +340,7 @@ the schema. sub connection { my ($self, @info) = @_; + return $self if !@info && $self->storage; my $storage_class = $self->storage_type; $storage_class = 'DBIx::Class::Storage'.$storage_class if $storage_class =~ m/^::/;