>connection does nothing if storage defined and no arguments (which in turn makes...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Schema.pm
index a50b26b..7e39162 100644 (file)
@@ -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/^::/;