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: 37996
Status: rejected
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: Tom.Denham [...] metaswitch.com
Cc:
AdminCc:

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



Subject: Argument "5.006_001" isn't numeric in subroutine entry
Date: Mon, 28 Jul 2008 17:22:57 +0100
To: <bug-Perl-Critic [...] rt.cpan.org>
From: "Tom Denham" <Tom.Denham [...] metaswitch.com>
I'm seeing the following when I use perl::critic Argument "5.006_001" isn't numeric in subroutine entry at /usr/lib/perl5/site_perl/5.8.8/Perl/Critic/Document.pm line 139. We use version string like: use 5.006_001; Which I believe are fine: http://perldoc.perl.org/5.8.8/functions/use.html Thanks Tom
Subject: Re: [rt.cpan.org #37996] Argument "5.006_001" isn't numeric in subroutine entry
Date: Mon, 28 Jul 2008 22:48:01 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Tom Denham via RT wrote: Show quoted text
> I'm seeing the following when I use perl::critic > > Argument "5.006_001" isn't numeric in subroutine entry at > /usr/lib/perl5/site_perl/5.8.8/Perl/Critic/Document.pm line 139. > > We use version string like: > use 5.006_001; > > Which I believe are fine: > http://perldoc.perl.org/5.8.8/functions/use.html
And that advice is bad because it marks that version of perl as an alpha version, which it isn't.
Subject: RE: [rt.cpan.org #37996] Argument "5.006_001" isn't numeric in subroutine entry
Date: Thu, 31 Jul 2008 14:26:39 +0100
To: <bug-Perl-Critic [...] rt.cpan.org>
From: "Tom Denham" <Tom.Denham [...] metaswitch.com>
Show quoted text
>-----Original Message----- >From: Elliot Shank via RT [mailto:bug-Perl-Critic@rt.cpan.org] >Sent: 29 July 2008 04:48 >To: Tom Denham >Subject: Re: [rt.cpan.org #37996] Argument "5.006_001" isn't numeric in
subroutine entry>> Show quoted text
> ><URL: http://rt.cpan.org/Ticket/Display.html?id=37996 >> > >Tom Denham via RT wrote:
>> I'm seeing the following when I use perl::critic >> >> Argument "5.006_001" isn't numeric in subroutine entry at >> /usr/lib/perl5/site_perl/5.8.8/Perl/Critic/Document.pm line 139. >> >> We use version string like: >> use 5.006_001; >> >> Which I believe are fine: >> http://perldoc.perl.org/5.8.8/functions/use.html>
> >And that advice is bad because it marks that version of perl as an
alpha version, which it isn't. Show quoted text
>
Are you saying that version 5.6.1 is an alpha version? I'm not sure what you mean by the above statement...
Subject: Re: [rt.cpan.org #37996] Argument "5.006_001" isn't numeric in subroutine entry
Date: Thu, 31 Jul 2008 08:32:15 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Tom Denham via RT wrote: Show quoted text
>> Tom Denham via RT wrote:
>>> I'm seeing the following when I use perl::critic >>> >>> Argument "5.006_001" isn't numeric in subroutine entry at >>> /usr/lib/perl5/site_perl/5.8.8/Perl/Critic/Document.pm line 139. >>> >>> We use version string like: >>> use 5.006_001; >>> >>> Which I believe are fine: >>> http://perldoc.perl.org/5.8.8/functions/use.html>
>> And that advice is bad because it marks that version of perl as an
> alpha version, which it isn't. > > Are you saying that version 5.6.1 is an alpha version? I'm not sure what > you mean by the above statement...
The standard convention is that an underscore in a version number means that the version is a developer version and not a stable release.
Subject: Re: [rt.cpan.org #37996] Argument "5.006_001" isn't numeric in subroutine entry
Date: Thu, 31 Jul 2008 19:18:56 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
On Jul 31, 2008, at 8:32 AM, Elliot Shank via RT wrote: Show quoted text
> Queue: Perl-Critic > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37996 > > > Tom Denham via RT wrote:
>>> Tom Denham via RT wrote:
>>>> I'm seeing the following when I use perl::critic >>>> >>>> Argument "5.006_001" isn't numeric in subroutine entry at >>>> /usr/lib/perl5/site_perl/5.8.8/Perl/Critic/Document.pm line 139. >>>> >>>> We use version string like: >>>> use 5.006_001; >>>> >>>> Which I believe are fine: >>>> http://perldoc.perl.org/5.8.8/functions/use.html>
>>> And that advice is bad because it marks that version of perl as an
>> alpha version, which it isn't. >> >> Are you saying that version 5.6.1 is an alpha version? I'm not >> sure what >> you mean by the above statement...
> > The standard convention is that an underscore in a version number > means that the version is a developer version and not a stable > release.
Elliot is right. 5.6.1 is usually displayed numerically as 5.006001. Perl will parse it with the underscore and correctly equate the underscored and non-underscored version, but the Perl community has chosen the optional underscore as a convention to mean an unofficial software release. Chris
Sounds like what I struck in ticket 36570. The underlying evil, if I'm not mistaken, is that version.pm numify returns a non-number, and/or that List::Utils::max() numifies rather than using an overloaded compare operator. (You can more or less understand the latter, but the former seems very dodgy.)
Subject: Re: [rt.cpan.org #37996] Argument "5.006_001" isn't numeric in subroutine entry
Date: Fri, 22 Aug 2008 21:07:05 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Kevin Ryde via RT wrote: Show quoted text
> Sounds like what I struck in ticket 36570. The underlying evil, if I'm > not mistaken, is that version.pm numify returns a non-number, and/or > that List::Utils::max() numifies rather than using an overloaded compare > operator. (You can more or less understand the latter, but the former > seems very dodgy.)
And mentioned in #37996, as well. For situations involving "use <perl version>" using underscore, I have no sympathy for those using underscores in non-alpha/beta release numbers. The example in perlfunc for use is bad. However, yes, this does result from the return value of version::numify(). The base problem is that I don't want to get into the business of parsing version numbers; that's why we're using version.pm in the first place. If we were looking at /module/ version numbers, e.g. "use Foo::Bar 1.2_3 2, 3, 4", I'd feel that we'd have to do something about it. But in the case of perl versions, I don't feel at all inclined.
Agreed. The perldoc is just wrong. Don't use underscores for the perl version number. I'm going to mark this ticket as "rejected."