Bug 11474 - Remove experimental given/when from C4::Utils::Datatables
Summary: Remove experimental given/when from C4::Utils::Datatables
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Colin Campbell
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-03 10:46 UTC by Colin Campbell
Modified: 2014-12-07 20:07 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed Patch (1.58 KB, patch)
2014-01-03 10:56 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 11474: Remove errors caused by use of switch (1.63 KB, patch)
2014-01-05 07:57 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 11474: Remove errors caused by use of switch (1.76 KB, patch)
2014-01-05 22:50 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2014-01-03 10:46:22 UTC
In Perl 5.18 compile time errors are generated because of use of given and when keywords
Comment 1 Colin Campbell 2014-01-03 10:56:30 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-01-05 07:57:09 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-01-05 22:50:32 UTC
Created attachment 23913 [details] [review]
[PASSED QA] Bug 11474: Remove errors caused by use of switch

Have replaced a switch statement by an if so we
do not get warnings on compilation

Note the perldoc for the subroutine was not correct
code was not testing that paramater equalled the values
but that it contained them. Have amended accordingly
Have documented behaviour in case parameter contains
neither value.
subroutine does not appear to me used elsewhere in
codebase

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/DateUtils.t.
Comment 4 Galen Charlton 2014-01-06 05:50:41 UTC
Pushed to master.  Thanks, Colin!