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

People
Owner: thaljef [...] cpan.org
Requestors: krasnoroot [...] mail.ru
Cc:
AdminCc:

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



Subject: a bug in Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict (false-positive)
Date: Mon, 12 Jan 2009 01:43:35 +0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Alexander Krasnorutsky <krasnoroot [...] mail.ru>
Greetings! I think that there is a CRITICal bug in this implementation of the policy: it does not `understand' that "use strict" is a block-scoped "pragma". So code like this: #======================= BEGIN { use strict } 1; #======================= does not cause any warnings about violation from the policy. Best regards -- Alexander Krasnorutsky.
Subject: Re: [rt.cpan.org #42310] a bug in Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict (false-positive)
Date: Thu, 15 Jan 2009 21:14:28 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Alexander Krasnorutsky via RT wrote: Show quoted text
> I think that there is a CRITICal bug in this implementation of the > policy: it does not `understand' that "use strict" is a block-scoped > "pragma". So code like this: > #======================= > BEGIN { use strict } 1; > #======================= > > does not cause any warnings about violation from the policy.
Yup. None of the policies dealing with pragmata treat them as lexically scoped.
I'll take this one.
Fixed in revision 3019. Look for it in the next release.