From: Brandon Black Date: Tue, 11 Jul 2006 01:49:33 +0000 (+0000) Subject: get rid of an empty trailing hashref if appropriate X-Git-Tag: 0.03004~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd64d90d6e091f7036d297a23008648f38259793;p=dbsrgits%2FDBIx-Class-Schema-Loader.git get rid of an empty trailing hashref if appropriate --- diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index 8e6b5fd..6c7c87a 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -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]}; } }