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:
69547
Status:
rejected
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
SREZIC [...] cpan.org
Cc:
srezic [...] iconmobile.com
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
1.116
Fixed in:
(no value)



Subject: Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers shouldn't recommend "use constant"
If a different number than the allowed literal values (0, 1, 2) is used, then the user sees the warning: Use the Readonly or Const::Fast module or the "constant" pragma instead However, if the user really uses the constant pragma instead, then he sees a new warning Pragma "constant" used with a higher severity level than before. Probably the "use constant" hint should be removed in the ProhibitMagicNumbers policy. Regards, Slaven
Subject: Re: [rt.cpan.org #69547] Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers shouldn't recommend "use constant"
Date: Mon, 18 Jul 2011 09:49:56 -0500
To: bug-Perl-Critic@rt.cpan.org
From: Elliot Shank <perl@galumph.com>
On 7/18/11 9:06 AM, Slaven_Rezic via RT wrote:
Show quoted text
> Probably the "use constant" hint should be removed in the > ProhibitMagicNumbers policy.
The problem is that the user may have disabled the ProhibitConstantPragma policy, in which case this comment still applies. Policies are generally written to be independent of each other.
On 2011-07-18 10:50:12, clonezone wrote:
Show quoted text
> On 7/18/11 9:06 AM, Slaven_Rezic via RT wrote:
> > Probably the "use constant" hint should be removed in the > > ProhibitMagicNumbers policy.
> > The problem is that the user may have disabled the > ProhibitConstantPragma policy, in which case this comment still > applies. Policies are generally written to be independent of each > other.
OK, I understand this. Still it feels not good in terms of user experience --- recommend something, and then withdraw the recommendation, everything using just default policies. But I am not too hot about this issue, so feel free to close/reject it. Regards, Slaven


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.