From d7b542d713f671c031ca411489ec92b388b3d695 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Thu, 11 Feb 2016 23:30:36 -0500 Subject: [PATCH] Bug 15777 - Refactor and fix the RecordProcessor class TEST PLAN --------- 1) Apply all three patches 2) prove -v t/RecordProcessor.t -- all should be successful 3) run koha qa test tools --- Koha/RecordProcessor.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Koha/RecordProcessor.pm b/Koha/RecordProcessor.pm index cbbd726..b9d2918 100644 --- a/Koha/RecordProcessor.pm +++ b/Koha/RecordProcessor.pm @@ -103,13 +103,14 @@ sub new { : $param->{filters}; my @filters = ( ); - foreach my $filter (@{ $req_filters }) { - next unless $filter; - my $filter_module = $filter =~ m/:/ ? $filter : "Koha::Filter::${schema}::${filter}"; + foreach my $filter_name (@{ $req_filters }) { + next unless $filter_name; + # Fully qualify the module name. + my $filter_module = $filter_name =~ m/:/ ? $filter_name : "Koha::Filter::${schema}::${filter_name}"; if (can_load( modules => { $filter_module => undef } )) { - my $object = $filter_module->new(); - $filter_module->initialize($param); - push @filters, $object; + my $filter = $filter_module->new(); + $filter->initialize($param); + push @filters, $filter; } } -- 2.1.4