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

People
Owner:
thaljef [...] cpan.org
Requestors:
steve.kirkup [...] dss.virginia.gov
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
  • 0.14_01
  • 0.14_02
Fixed in:
0.15



Subject: RequirePackageWarnings, Args Error
Broken in 0.15 as well, # Failed test 'blib/lib/DSS/App/DCSE/Ocse/Overview.pm' # in /usr/lib/perl5/site_perl/5.8.3/Test/Perl/Critic.pm at line 98. # # Perl::Critic had errors in 'blib/lib/DSS/App/DCSE/Ocse/Overview.pm': # Wrong number of args to Violation->new() at /usr/lib/perl5/site_perl/5.8.3/Perl/Critic/Policy/TestingAndDebugging/RequirePackageWarnings.pm line 53 I ran this against my module and encountered this error. It appears that the PolicyEditor did not like this, #use warnings; When I removed the comment it compiled fine. I added the comment to prevent warning of non-critical errors for production. If need the code from my module I can send it to you via email. Steve K
I have a pretty good idea what the problem is. But to be sure, would you mind sending me the file that you were analyzing. Thanks. -Jeff On Tue Mar 28 09:03:27 2006, guest wrote:
Show quoted text
> Broken in 0.15 as well, > > # Failed test 'blib/lib/DSS/App/DCSE/Ocse/Overview.pm' > # in /usr/lib/perl5/site_perl/5.8.3/Test/Perl/Critic.pm at line 98. > # > # Perl::Critic had errors
in 'blib/lib/DSS/App/DCSE/Ocse/Overview.pm':
Show quoted text
> # Wrong number of args to Violation->new() at > /usr/lib/perl5/site_perl/5.8.3/Perl/Critic/Policy/TestingAndDebugging
/RequirePackageWarnings.pm
Show quoted text
> line 53 > > I ran this against my module and encountered this error. It appears > that the PolicyEditor did not like this, > > #use warnings; > > When I removed the comment it compiled fine. I added the comment to > prevent warning of non-critical errors for production. If need the > code > from my module I can send it to you via email. > > Steve K
Subject: RE: [rt.cpan.org #18407] RequirePackageWarnings, Args Error
Date: Thu, 30 Mar 2006 14:57:20 -0500
To: <bug-Perl-Critic@rt.cpan.org>
From: "Steve Kirkup" <steve.kirkup@dss.virginia.gov>
Jeff, Here is a copy of the module I was using that gave me that error. Steve K
Show quoted text
-----Original Message----- From: Jeffrey Thalhammer via RT [mailto:bug-Perl-Critic@rt.cpan.org] Sent: Thursday, March 30, 2006 2:03 PM To: steve.kirkup@dss.virginia.gov Subject: [rt.cpan.org #18407] RequirePackageWarnings, Args Error <URL: http://rt.cpan.org/Ticket/Display.html?id=18407 > I have a pretty good idea what the problem is. But to be sure, would you mind sending me the file that you were analyzing. Thanks. -Jeff On Tue Mar 28 09:03:27 2006, guest wrote:
> Broken in 0.15 as well, > > # Failed test 'blib/lib/DSS/App/DCSE/Ocse/Overview.pm' > # in /usr/lib/perl5/site_perl/5.8.3/Test/Perl/Critic.pm at line 98. > # > # Perl::Critic had errors
in 'blib/lib/DSS/App/DCSE/Ocse/Overview.pm':
> # Wrong number of args to Violation->new() at > /usr/lib/perl5/site_perl/5.8.3/Perl/Critic/Policy/TestingAndDebugging
/RequirePackageWarnings.pm
> line 53 > > I ran this against my module and encountered this error. It appears > that the PolicyEditor did not like this, > > #use warnings; > > When I removed the comment it compiled fine. I added the comment to > prevent warning of non-critical errors for production. If need the > code > from my module I can send it to you via email. > > Steve K

Message body is not shown because sender requested not to inline it.

Subject: RE: [rt.cpan.org #18407] RequirePackageWarnings, Args Error
Date: Thu, 30 Mar 2006 16:09:49 -0500
To: <bug-Perl-Critic@rt.cpan.org>
From: "Steve Kirkup" <steve.kirkup@dss.virginia.gov>
Jeff, Noticed a minor typo, Login number not separated with underscores references PBP page 55, should be 59. Steve Kirkup
Thanks for the file. Here is the problem: I wanted to clarify the intent of policies with ambiguous or odd names. So between versions 0.13 and 0.14, I changed the names of some of the Policy modules that are distributed with Perl::Critic. At the same time, the Violation interface changed and Policy modules from versions <= 0.13 are not compatible with Perl::Critic versions >= 0.14. For example, the module that generated this exception is called RequirePackageWarnings but in version 0.14, that module was replaced with RequireUseWarnings. But the old module is still lingering in your site_perl and is not compatible with newer Critics. The solution is to delete the Perl/Critic/Policy directory from your site_perl, and then re-install. There is supposed to be a warning message about all of this when you 'make' Perl::Critic, but it is easy to miss if you're not watching the build process scroll by. Sorry for the inconvenience. Let me know if you have any troubles. -Jeff
Subject: RE: [rt.cpan.org #18407] RequirePackageWarnings, Args Error
Date: Fri, 31 Mar 2006 08:33:51 -0500
To: <bug-Perl-Critic@rt.cpan.org>
From: "Steve Kirkup" <steve.kirkup@dss.virginia.gov>
Jeff, And because it is still there trying to call RequirePackageWarnings with the wrong number of ARGS it dies... I can understand what you are trying to do, make the policies make comprehensible but you should not let old policy files stick around. You should update the old policy files saying that it has been depreciated and should be deleted. Steve Kirkup
Show quoted text
-----Original Message----- From: Jeffrey Thalhammer via RT [mailto:bug-Perl-Critic@rt.cpan.org] Sent: Thursday, March 30, 2006 4:36 PM To: steve.kirkup@dss.virginia.gov Subject: [rt.cpan.org #18407] RequirePackageWarnings, Args Error <URL: http://rt.cpan.org/Ticket/Display.html?id=18407 > Thanks for the file. Here is the problem: I wanted to clarify the intent of policies with ambiguous or odd names. So between versions 0.13 and 0.14, I changed the names of some of the Policy modules that are distributed with Perl::Critic. At the same time, the Violation interface changed and Policy modules from versions <= 0.13 are not compatible with Perl::Critic versions >= 0.14. For example, the module that generated this exception is called RequirePackageWarnings but in version 0.14, that module was replaced with RequireUseWarnings. But the old module is still lingering in your site_perl and is not compatible with newer Critics. The solution is to delete the Perl/Critic/Policy directory from your site_perl, and then re-install. There is supposed to be a warning message about all of this when you 'make' Perl::Critic, but it is easy to miss if you're not watching the build process scroll by. Sorry for the inconvenience. Let me know if you have any troubles. -Jeff


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.