From 5988302a65398d20c8f9323d1fd6db38226dbabb Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 11 Jun 2014 06:58:37 +0000 Subject: [PATCH] fix for perl 5.10 not auto-dereferncing --- Netdisco/lib/App/Netdisco/DB/ResultSet.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/DB/ResultSet.pm b/Netdisco/lib/App/Netdisco/DB/ResultSet.pm index 47d7c696..6faa6e3d 100644 --- a/Netdisco/lib/App/Netdisco/DB/ResultSet.pm +++ b/Netdisco/lib/App/Netdisco/DB/ResultSet.pm @@ -93,7 +93,7 @@ sub _with_datatables_order_clause { my @order = (); if ( defined $params->{'order'}{0} ) { - for ( my $i = 0; $i < keys $params->{'order'}; $i++ ) { + for ( my $i = 0; $i < (scalar keys %{$params->{'order'}}); $i++ ) { # build direction, must be '-asc' or '-desc' (cf. SQL::Abstract) # we only get 'asc' or 'desc', so they have to be prefixed with '-' @@ -132,7 +132,7 @@ sub _with_datatables_where_clause { && $params->{'search'}{'value'} ) { my $search_string = $params->{'search'}{'value'}; - for ( my $i = 0; $i < keys $params->{'columns'}; $i++ ) { + for ( my $i = 0; $i < (scalar keys %{$params->{'columns'}}); $i++ ) { # Iterate over each column and check if it is searchable. # If so, add a constraint to the where clause restricting the given