Summary: | Unnecessary use of Exporter in SIP/ILS objects | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | Architecture, internals, and plumbing | Assignee: | Galen Charlton <gmcharlt> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P5 - low | CC: | chris, colin.campbell, jcamins, kyle, mtj, paul.poulain |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Proposed Patch
Bug 8429: Remove unnecessary use of Exporter from SIP/ILS Patch rebased against current head [SIGNED-OFF] Bug 8429: Remove unnecessary use of Exporter from SIP/ILS |
Description
Colin Campbell
2012-07-12 14:08:18 UTC
Created attachment 10796 [details] [review] Proposed Patch Should not change functionality - removes unused module and promotes a more consistent approach to the interface and inheritance Created attachment 11685 [details] [review] Bug 8429: Remove unnecessary use of Exporter from SIP/ILS All the modules in the SIP/ILS tree are objects The addition of calls to Exporter or hand manipulation of @ISA added unnecessary bloat Removed the "self = shift or return" idiom as it is nonsensical if the method can only be called via an object. standardized inheritance via use parent added a $self = shift in a couple of places where it was not strictly necessary as its absence seemed to have misled readers in the past Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> > Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> nice patch!, passing QA… $ koha-qa.pl testing 1 commit(s) (applied to commit 2a60d49) * 3e771fc Bug 8429: Remove unnecessary use of Exporter from SIP/ILS C4/SIP/ILS/Item.pm C4/SIP/ILS/Patron.pm C4/SIP/ILS/Transaction/Checkin.pm C4/SIP/ILS/Transaction/Checkout.pm C4/SIP/ILS/Transaction/FeePayment.pm C4/SIP/ILS/Transaction/Hold.pm C4/SIP/ILS/Transaction/Renew.pm C4/SIP/ILS/Transaction/RenewAll.pm * C4/SIP/ILS/Item.pm OK * C4/SIP/ILS/Patron.pm OK * C4/SIP/ILS/Transaction/Checkin.pm OK * C4/SIP/ILS/Transaction/Checkout.pm OK * C4/SIP/ILS/Transaction/FeePayment.pm OK * C4/SIP/ILS/Transaction/Hold.pm OK * C4/SIP/ILS/Transaction/Renew.pm OK * C4/SIP/ILS/Transaction/RenewAll.pm OK Sorry colin, but I just pushed bug 8336 (from you), and this one does not apply anymore. Should not be hard to fix: CONFLICT (content): Merge conflict in C4/SIP/ILS/Transaction/RenewAll.pm Auto-merging C4/SIP/ILS/Transaction/Renew.pm CONFLICT (content): Merge conflict in C4/SIP/ILS/Transaction/Renew.pm Failed to merge in the changes. Created attachment 12333 [details] [review] Patch rebased against current head Rebased against current head basically the use parent in two files now replaces the use base added by a patch to the renew functionality. Created attachment 13360 [details] [review] [SIGNED-OFF] Bug 8429: Remove unnecessary use of Exporter from SIP/ILS All the modules in the SIP/ILS tree are objects The addition of calls to Exporter or hand manipulation of @ISA added unnecessary bloat Removed the "self = shift or return" idiom as it is nonsensical if the method can only be called via an object. standardized inheritance via use parent added a $self = shift in a couple of places where it was not strictly necessary as its absence seemed to have misled readers in the past Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed off with a caveat. The 'parent' pragma was not part of the perl core until version 5.10.1. Do we require this version of perl? What about installations still stuck on Lenny? I don't know about other distributions perl versions. (In reply to comment #7) > Signed off with a caveat. The 'parent' pragma was not part of the perl core > until version 5.10.1. Do we require this version of perl? What about > installations still stuck on Lenny? I don't know about other distributions > perl versions. We upped the required version to 5.10 a few releases ago in a couple of places we have a use 5.10 to explicitly use 5.10 features (even 5.10 is no longer really a supported perl release!) QA comment: patch passed QA already (see comment 3), also had a signoff from chris (from before the rebase) setting passed QA in the name of Mason PS: is it really an ENH ? I think it's more a minor bugfix, so changing severity accordingly This patch has been pushed to master. I do not have a self-check machine so I was unable to test this thoroughly, however, the changes look good and SIP *seems* to still work. Further tests prior to the 3.12 release would be greatly appreciated. |