foreach my $filter (@{ $req_filters }) { next unless $filter; my $filter_module = $filter =~ m/:/ ? $filter : "Koha::Filter::${schema}::${filter}"; if (can_load( modules => { $filter_module => undef } )) { my $object = $filter_module->new(); $filter_module->initialize($param); push @filters, $object; } } "$filter_module->initialize($param);" should be "$object->initialize($param); Additionally, object isn't really descriptive, and it isn't clear that $filter is the string name of the filter. So, this loop will have some variable renaming done on it. And the first commit will include a test that fails to initialize. And the second commit will include this revision which should then pass.
Created attachment 47941 [details] [review] Bug 15777 - Test to prove initialization isn't working correctly. TEST PLAN --------- 1) Apply this testing patch 2) prove -v t/RecordProcessor.t -- tests will fail. 3) run koha qa test tools
Created attachment 47942 [details] [review] Bug 15777 - Fix base class to prove refactor and fix required TEST PLAN --------- 1) Apply the testing patch and this patch 2) prove -v t/RecordProcess.t -- will complain about string use with "use strict". This is because it is using the module name, instead of the object instantiated with new(). 3) run koha qa test tools.
Created attachment 47943 [details] [review] 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
Created attachment 47978 [details] [review] Bug 15777 - Test to prove initialization isn't working correctly. TEST PLAN --------- 1) Apply this testing patch 2) prove -v t/RecordProcessor.t -- tests will fail. 3) run koha qa test tools Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 47979 [details] [review] Bug 15777 - Fix base class to prove refactor and fix required TEST PLAN --------- 1) Apply the testing patch and this patch 2) prove -v t/RecordProcess.t -- will complain about string use with "use strict". This is because it is using the module name, instead of the object instantiated with new(). 3) run koha qa test tools. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 47980 [details] [review] 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 Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 47988 [details] [review] Bug 15777 - Test to prove initialization isn't working correctly. TEST PLAN --------- 1) Apply this testing patch 2) prove -v t/RecordProcessor.t -- tests will fail. 3) run koha qa test tools Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 47990 [details] [review] Bug 15777 - Fix base class to prove refactor and fix required TEST PLAN --------- 1) Apply the testing patch and this patch 2) prove -v t/RecordProcess.t -- will complain about string use with "use strict". This is because it is using the module name, instead of the object instantiated with new(). 3) run koha qa test tools. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 47991 [details] [review] 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 Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48000 [details] [review] 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 Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Sorry... git bz attach gone awry. Nothing changed.
pushed to Master - Should be in the May 2016 Release. Thanks
Patches pushed to 3.22.x, will be in 3.22.4