Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 36570
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: highest_explicit_perl_version versus underscore
Date: Mon, 09 Jun 2008 10:55:09 +1000
To: bug-perl-critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
In perlcritic 1.084 and the debian packaged perl 5.10.0 the program foo.pl below prints Argument "5.006_000" isn't numeric in subroutine entry at /usr/share/perl5/Perl/Critic/Document.pm line 138. highest version 5.006_000 where I hoped not to get a warning. The similar program bar.pl below is a bit worse, Argument "5.006_003" isn't numeric in subroutine entry at /usr/share/perl5/Perl/Critic/Document.pm line 138. Argument "5.006_001" isn't numeric in subroutine entry at /usr/share/perl5/Perl/Critic/Document.pm line 138. highest version 5.006_001 It picks 5.006_001 as the highest where I hoped it would be the 5.006_003. I struck the foo.pl warning in the cpan "classes" file "classes.pm" which has a "use 5.006_001;" (among other things). The bar.pl is a contrivance getting an actual ill effect from the truncated comparing. I wonder if List::Util::max() in highest_explicit_perl_version() might be hitting the "numify" of version objects (instead of using their overloaded ">" etc), that latter unhelpfully returning a non-number like '5.006_003'. Perhaps highest_explicit_perl_version() might have to use a "List::Util::reduce()" style to be sure of the comparing.

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #36570] highest_explicit_perl_version versus underscore
Date: Sat, 10 Jan 2009 08:34:58 +1100
To: bug-Perl-Critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
I'm now pretty sure List::Utils::max() is to blame, or isn't the tool for the job. I believe it, and min() and sum(), are only meant for ordinary numbers, not objects as such. I think the change below would be the simplest way to put the job solely in the hands of version.pm. Whether an underscore for "alpha" with a perl version declaration ought to be used could be a good subject for a policy (ditto maybe whether v-string or two-dots ought to be used), but anything PPI+version.pm can understand would work.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #36570] highest_explicit_perl_version versus underscore
Date: Thu, 15 Jan 2009 21:30:53 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Kevin Ryde via RT wrote: Show quoted text
> I think the change below would be the simplest way to put the job solely > in the hands of version.pm.
Applied.
This has been fixed and released as Perl-Critic-1.095_001 to a CPAN near you. Thanks for reporting this bug. -Jeff