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

People
Owner: Nobody in particular
Requestors: claco [...] cpan.org
MichaelRWolf [...] att.net
Cc:
AdminCc:

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



Subject: .perlrc file - inconsistend documentation, and silently permissive parser
The examples in these two pages are similar, but not identical. One uses the installed policy names, the other one uses (I'm guessing, but possibly) older names: http://search.cpan.org/~thaljef/Perl-Critic-0.17/lib/Perl/Critic.pm#CONFIGURATION http://search.cpan.org/~thaljef/Perl-Critic-0.17/lib/Perl/Critic/Config.pm#CONFIGURATION They should both be referencing these policies: m/^TestingAndDebugging::(RequireUseWarnings|RequireUseStrict)$/ From a maintenance POV, it would probably be better to refactor the documentation for DRY - don't repeat yourself. What's worse, no error is generated for an ill-formed .perlcriticrc file.
Subject: RE: [rt.cpan.org #20068] - grep list of offending files/lines
Date: Sat, 24 Jun 2006 00:10:10 -0400
To: <bug-Perl-Critic [...] rt.cpan.org>
From: "Michael R. Wolf" <MichaelRWolf [...] att.net>
Sorry if the emailer wrapped the lines. The attachment has them OK if you can get to them, else a quick/dirty ediging job should restore it: lib/Perl/Critic/Config.pm:559: [TestingAndDebugging::RequirePackageStricture] lib/Perl/Critic/Config.pm:562: [TestingAndDebugging::RequirePackageWarnings] lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoStrict.pm:103:L<Perl::C ritic::Policy::TestingAndDebugging::RequirePackageStricture> lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoWarnings.pm:103:L<Perl: :Critic::Policy::TestingAndDebugging::RequirePackageWarnings> lib/Perl/Critic/Policy/TestingAndDebugging/RequireUseStrict.pm:115:L<Perl::C ritic::Policy::TestingAndDebugging::RequirePackageWarnings> lib/Perl/Critic/Policy/TestingAndDebugging/RequireUseWarnings.pm:119:L<Perl: :Critic::Policy::TestingAndDebugging::RequirePackageStricture> -- Michael R. Wolf All mammals learn by playing! MichaelRWolf@att.net
Download xxx
application/octet-stream 711b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #20068] .perlrc file - inconsistend documentation, and silently permissive parser
Date: Sat, 24 Jun 2006 01:40:34 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Chris Dolan <chris [...] clotho.com>
On Jun 23, 2006, at 10:54 PM, Guest via RT wrote: Show quoted text
> The examples in these two pages are similar, but not identical. One > uses the installed policy names, the other one uses (I'm guessing, but > possibly) older names: > > http://search.cpan.org/~thaljef/Perl-Critic-0.17/lib/Perl/ > Critic.pm#CONFIGURATION > > http://search.cpan.org/~thaljef/Perl-Critic-0.17/lib/Perl/Critic/ > Config.pm#CONFIGURATION > > They should both be referencing these policies: > m/^TestingAndDebugging::(RequireUseWarnings|RequireUseStrict)$/
You are right, they are old names. I've fixed those two doc errors. Show quoted text
> From a maintenance POV, it would probably be better to refactor the > documentation for DRY - don't repeat yourself.
Agreed. We've been making (small) steps in that direction. Show quoted text
> What's worse, no error is generated for an ill-formed .perlcriticrc > file.
That's a very good point. I'll add that to the TODO list. -- Chris
Thanks for pointing out the documentation errors. Perl::Critic::Config does whine if your configuration refers to a module that doesn't seem to exist. But at one time, Perl::Critic did ship with RequirePackageStrictures and RequirePackageWarnings policy modules. As you discovered, those modules were renamed back in version 0.13_02. But if you had previously installed an older version, Perl::Critic::Config would still find them in your @INC and would not complain about seeing them in your perlcriticrc file. Have you ever installed a Perl::Critic version <= 0.14? -Jeff
Subject: RE: [rt.cpan.org #20068] .perlrc file - inconsistend documentation, and silently permissive parser
Date: Thu, 6 Jul 2006 12:32:27 -0700
To: <bug-Perl-Critic [...] rt.cpan.org>
From: "Michael R. Wolf" <MichaelRWolf [...] att.net>
I don't think so. I think I got on board at the 0.16 and 0.17 releases. -- Michael R. Wolf All mammals learn by playing! MichaelRWolf@att.net Show quoted text
> -----Original Message----- > From: Jeffrey Thalhammer via RT [mailto:bug-Perl-Critic@rt.cpan.org] > Sent: Sunday, July 02, 2006 8:25 PM > To: MichaelRWolf@att.net > Subject: [rt.cpan.org #20068] .perlrc file - inconsistend documentation, > and silently permissive parser > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=20068 > > > Thanks for pointing out the documentation errors. > > Perl::Critic::Config does whine if your configuration refers to a module > that doesn't seem to exist. But at one time, Perl::Critic did ship with > RequirePackageStrictures and RequirePackageWarnings policy modules. As > you discovered, those modules were renamed back in version 0.13_02. But > if you had previously installed an older version, Perl::Critic::Config > would still find them in your @INC and would not complain about seeing > them in your perlcriticrc file. > > Have you ever installed a Perl::Critic version <= 0.14? > > -Jeff
Ok. Can you send me a .perlcriticrc file that you think _should_ generate a warning, but does not? Thanks a bunch. -Jeff
Subject: No warnings about malformed config file
If one manages to screw up their profile/rc file by leaving off a brace, Perl::Critic makes no mention of the fact that it hasn't loaded the requested file and dutifully goes about testing everything anyways. [-Documentation::RequirePodAtEnd It might be nice to spit out a warning, or even bail if the file is malformed or the requested profile hasn't been loaded. :-)