Bug 8491 - Warning of Modern::Perl raised by koha_perl_deps script
Summary: Warning of Modern::Perl raised by koha_perl_deps script
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 10:22 UTC by Marcel de Rooy
Modified: 2014-12-07 20:03 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2012-07-23 10:22:10 UTC
The actual error is (with perl 5.14.2 and Modern::Perl==1.20120130):
[Fri Jul 20 16:37:07 2012] koha_perl_deps.pl: Use of uninitialized value $version in numeric lt (<) at /usr/local/share/perl5/Modern/Perl.pm line 25.
[Fri Jul 20 16:37:07 2012] koha_perl_deps.pl: Use of uninitialized value $version in numeric lt (<) at /usr/local/share/perl5/Modern/Perl.pm line 25.

As Jonathan Druart pointed out in bug 7368, it is caused by the way this module handles version numbers.

So it seems like an error in Modern::Perl although its docs state that it is not necessary to pass a version or a year to Modern::Perl.
AFAIK we are not passing numbers to Modern::Perl in our Koha use statements. But when I test that in a simple script, I do not even raise this warning. What makes koha_perl_deps do raise that warning?
Comment 1 Marcel de Rooy 2014-02-27 14:21:32 UTC
The $pkg->VERSION check on module Modern::Perl itself generates the warning for older versions of this CPAN module.
The latest version 1.20140107  contains this line now:
return $VERSION unless defined $version;
And that will resolve it.

Note checking $Modern::Perl::VERSION ($pkg::VERSION) in the old situation would have been fine too.

Closed.