Skip Menu |

This queue is for tickets about the Modern-Perl CPAN distribution.

Report information
The Basics
Id: 80304
Status: resolved
Priority: 0/
Queue: Modern-Perl

People
Owner: chromatic [...] cpan.org
Requestors: peter [...] vereshagin.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.20120521
Fixed in: (no value)



Subject: avoid warning on ->VERSION()
I use the Dist::Zilla::Plugin::ReportVersions. It inject the t/000-report-versions.t into the Dizt::Zilla build of the perl module The t/000-report-versions.t contains: require_ok $module or BAIL_OUT("can't load $module"); my $version = $module->VERSION; thus calling the Modern::Perl->VERSION without arguments. This generates the warning: Modern::Perl: Use of uninitialized value $version in numeric lt (<) at Modern/Perl.pm The patch supplied solves the problem.
Subject: Modern-Perl-sub-VERSION-nowarn.patch
--- Modern/Perl.pm.orig 2012-10-20 22:55:13.000000000 +0400 +++ Modern/Perl.pm 2012-10-20 23:01:18.000000000 +0400 @@ -22,7 +22,7 @@ sub VERSION { my ($self, $version) = @_; - return $VERSION if $version < 2009; + return $VERSION if not( defined $version ) or $version < 2009; $wanted_date = $version if (caller(1))[3] =~ /::BEGIN/; return 2012;
Thanks for the report! Fixed in 1.20121103.