projects
/
dbsrgits/DBIx-Class.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Remove bizarre $_[$#_] idiom from the codebase
[dbsrgits/DBIx-Class.git]
/
lib
/
DBIx
/
Class
/
CDBICompat
/
Relationships.pm
diff --git
a/lib/DBIx/Class/CDBICompat/Relationships.pm
b/lib/DBIx/Class/CDBICompat/Relationships.pm
index
ecbc5c2
..
f3c0c9c
100644
(file)
--- a/
lib/DBIx/Class/CDBICompat/Relationships.pm
+++ b/
lib/DBIx/Class/CDBICompat/Relationships.pm
@@
-199,7
+199,7
@@
sub meta_info {
sub search {
my $self = shift;
my $attrs = {};
- if (@_ > 1 && ref $_[$#_] eq 'HASH') {
+ if (@_ > 1 && ref $_[-1] eq 'HASH') {
$attrs = { %{ pop(@_) } };
}
my $where = (@_ ? ((@_ == 1) ? ((ref $_[0] eq "HASH") ? { %{+shift} } : shift)