From: Rob Kinyon Date: Thu, 19 Mar 2009 17:05:00 +0000 (+0000) Subject: Special-case handling for (undef,undef) passed to search_rs() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c44f477f5bd73fe1863b500f7760bb6ded573e73;p=dbsrgits%2FDBIx-Class-Historic.git Special-case handling for (undef,undef) passed to search_rs() --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index e600144..5253777 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -279,6 +279,11 @@ always return a resultset, even in list context. sub search_rs { my $self = shift; + # Special-case handling for (undef, undef). + if ( @_ == 2 && !defined $_[1] && !defined $_[0] ) { + pop(@_); pop(@_); + } + my $attrs = {}; $attrs = pop(@_) if @_ > 1 and ref $_[$#_] eq 'HASH'; my $our_attrs = { %{$self->{attrs}} };