get rid of an empty trailing hashref if appropriate
Brandon Black [Tue, 11 Jul 2006 01:49:33 +0000 (01:49 +0000)]
lib/DBIx/Class/Schema/Loader.pm

index 8e6b5fd..6c7c87a 100644 (file)
@@ -148,6 +148,7 @@ sub connection {
     if($_[-1] && ref $_[-1] eq 'HASH') {
         if(my $loader_opts = delete $_[-1]->{loader_options}) {
             $self->loader_options($loader_opts);
+            pop @_ if !keys %{$_[-1]};
         }
     }