>connection does nothing if storage defined and no arguments (which in turn makes...
Brandon L. Black [Wed, 15 Mar 2006 13:18:33 +0000 (13:18 +0000)]
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/^::/;