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

People
Owner: Nobody in particular
Requestors: LEONT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 1.109
  • 1.111
Fixed in:
  • 1.110_001
  • 1.112_001
  • 1.112_002
  • 1.113



Subject: Allow Const::Fast in Policy::ValuesAndExpressions::ProhibitMagicNumbers
Const::Fast is a replacement for Readonly. Unlike the latter it's maintained and its implementation strategy doesn't have a long history of bugs, as explained at http://blogs.perl.org/users/leon_timmermans/2010/08/yet-another-readonly-module.html. Therefor, I would like ProhibitMagicNumbers to allow the use of Const::Fast where it currently allows Readonly.
Subject: Re: [rt.cpan.org #60938] Allow Const::Fast in Policy::ValuesAndExpressions::ProhibitMagicNumbers
Date: Wed, 01 Sep 2010 07:14:20 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
I agree with this long term, but I want to wait a bit for the module to prove itself before endorsing it. I've looked at Const::Fast's source and it looks good. I'm considering trying it out at work. But I still want to allow time for the Perl community as a whole to form an opinion.
On Wed Sep 01 08:14:32 2010, clonezone wrote: Show quoted text
> I agree with this long term, but I want to wait a bit for the module > to prove itself before endorsing it. I've looked at Const::Fast's > source and it looks good. I'm considering trying it out at work. > But I still want to allow time for the Perl community as a whole to > form an opinion.
Sounds reasonable. I hope to hear from you in due time. :-)
Subject: Re: [rt.cpan.org #60938] Allow Const::Fast in Policy::ValuesAndExpressions::ProhibitMagicNumbers
Date: Wed, 01 Sep 2010 08:00:46 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Honestly, after a period of time, I'm thinking of switching Perl::Critic over to it. The problem with this would be that we'd need to drop support for perl 5.6 in order to do it. (But what I really want to do is to move to 5.10. :] )
On Wed Sep 01 09:00:58 2010, clonezone wrote: Show quoted text
> Honestly, after a period of time, I'm thinking of switching > Perl::Critic over to it. The problem with this would be that we'd > need to drop support for perl 5.6 in order to do it. (But what I > really want to do is to move to 5.10. :] )
Judging by the CPAN testers matrix, 5.6 support already has serious issues. The lack of test results for 5.6 may indicate one of its dependencies no longer installing properly on 5.6, but I have no idea which one that would be. Fact is the last positive result (which is probably the last result whatsoever) is more than two years old.
On Wed Sep 01 10:16:45 2010, LEONT wrote: Show quoted text
> Judging by the CPAN testers matrix, 5.6 support already has serious > issues. The lack of test results for 5.6 may indicate one of its > dependencies no longer installing properly on 5.6, but I have no idea > which one that would be. Fact is the last positive result (which is > probably the last result whatsoever) is more than two years old.
Found it. Exception::Class (a dependency of PPIx::Utilities::Statement) no longer installs on anything less than 5.8.1, it broke in 1.24. "Non-intrusive patches to make it work on 5.8.0 or less (again) will be accepted."
A patch addressing the bug you found in Subroutines::ProhibitManyArgs has been committed as SVN revision 3916. It should now (well, as of the next release) understand prototype groups.
Subject: Re: [rt.cpan.org #60938] Allow Const::Fast in Policy::ValuesAndExpressions::ProhibitMagicNumbers
Date: Wed, 01 Sep 2010 18:19:56 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
On 9/1/10 10:14 AM, Leon Timmermans via RT wrote: Show quoted text
> Found it. Exception::Class (a dependency of PPIx::Utilities::Statement) > no longer installs on anything less than 5.8.1, it broke in 1.24. > "Non-intrusive patches to make it work on 5.8.0 or less (again) will be > accepted."
Yeah, but our minimum version is 1.23, which does work on 5.6.
Ticket 62562 (ValuesAndExpressions::ProhibitMagicNumbers should be able to give a Readonly equivalent) was addressed by allowing the user to configure the policy. This sidesteps the question of whether the policy should accept Const::Fast out of the box, but since it allows the user of the policy to make it recognize Const::Fast, I'm calling this one patched.
Subject: Re: [rt.cpan.org #60938] Allow Const::Fast in Policy::ValuesAndExpressions::ProhibitMagicNumbers
Date: Sat, 13 Nov 2010 15:15:58 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
I'm calling this patched because I've added support for Const::Fast to ProhibitMagicNumbers and to PPIx::Utilities::Statement::get_constant_name_elements_from_declaring_statement(). These changes should in no way be taken to imply that I've got an inexplicable problem at work that goes away when Readonly is taken out of the picture. Nope, that's not happening. No, really. What, you don't believe me?
CC: LEONT [...] cpan.org
Subject: Re: [rt.cpan.org #60938] Allow Const::Fast in Policy::ValuesAndExpressions::ProhibitMagicNumbers
Date: Sun, 14 Nov 2010 13:00:31 +0100
To: bug-Perl-Critic [...] rt.cpan.org
From: Leon Timmermans <fawaka [...] gmail.com>
On Sat, Nov 13, 2010 at 10:16 PM, Elliot Shank via RT <bug-Perl-Critic@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=60938 > > > I'm calling this patched because I've added support for Const::Fast to ProhibitMagicNumbers and to PPIx::Utilities::Statement::get_constant_name_elements_from_declaring_statement(). > > These changes should in no way be taken to imply that I've got an inexplicable problem at work that goes away when Readonly is taken out of the picture.  Nope, that's not happening.  No, really.  What, you don't believe me?
Thanks :-)