Bug 15215 - Remove Depreciation Errors due to misuse of UNIVERSAL in SIP/Sip/MsgType.pm
Summary: Remove Depreciation Errors due to misuse of UNIVERSAL in SIP/Sip/MsgType.pm
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Colin Campbell
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 12:04 UTC by Colin Campbell
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

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


Attachments
Proposed patch (1.43 KB, patch)
2015-11-19 12:27 UTC, Colin Campbell
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15215: Remove warning due to misuse of UNIVERSAL (1.54 KB, patch)
2015-11-20 11:50 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 15215: Remove warning due to misuse of UNIVERSAL (1.60 KB, patch)
2015-11-20 14:00 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 2015-11-19 12:04:40 UTC
Compiling C4/SIP/Sip/MsgType.pm generates the warning

UNIVERSAL->import is deprecated and will be removed in a future perl in perl 5.22 this is now a fatal error causing compilation to abort with the message 'UNIVERSAL does not export anything'. (And e.g. crashing Koha's test suite fairly early on)

replace invalid call to UNIVERSAL with a use UNIVERSAL::can to avoid this
Comment 1 Colin Campbell 2015-11-19 12:27:28 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2015-11-20 11:50:04 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-11-20 14:00:26 UTC
Created attachment 45043 [details] [review]
[PASSED QA] Bug 15215: Remove warning due to misuse of UNIVERSAL

Calling UNIVERSAL's internal methods will cause a depreciation
warning in perls less that 5.22 as of 5.22 the warning is a fatal
error causing compilation to abort

Replace the use UNIVERSAL with UNIVERSAL::can to work around the
buggy construct perldoc UNIVERSAL::can for more info

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more worning/error
No qa errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2015-11-20 14:25:02 UTC
Patch pushed to master.

Thanks Colin!
Comment 5 Frédéric Demians 2015-11-29 21:13:05 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.