get rid of an empty trailing hashref if appropriate
[dbsrgits/DBIx-Class-Schema-Loader.git] / 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]};
         }
     }