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

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

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



Subject: Perl::Critic::Policy::Modules::RequireVersionVar should not complain in test files
If file.t uses Test::More (extension .t and obviously a test file) it is unreasonable to require a $VERSION t/foo.t#1.1: [2 - Modules::RequireVersionVar] No package-scoped "$VERSION" variable found :#!/usr/bin/perl maybe .t + Test::More should be configurable or use other logic
Hi On Fri Mar 22 04:26:12 2013, HMBRAND wrote: Show quoted text
> If file.t uses Test::More (extension .t and obviously a test file) it > is unreasonable to require a $VERSION > > t/foo.t#1.1: [2 - Modules::RequireVersionVar] No package- > scoped "$VERSION" variable found :#!/usr/bin/perl > > maybe .t + Test::More should be configurable or use other logic
I would like to request this to extend also on programs. In Debian we had the following Bugreport submitted by Guillem Jover: http://bugs.debian.org/706266 Suggesting: ---(snip)--- The Policy::Modules::RequireVersionVar triggers even on programs (i.e. non-modules and non-libraries). This is very annoying because while VERSION on modules serve a purpose for the code using them on import, VERSION on programs is mostly documentation if at all, and just useless for things like test suites for example. That's one of the reasons I've had to disable this globally on dpkg for example, and I know other people do the same for the same reason. And I'd rather have it enabled for modules. Here's a patch disabling the check for programs (which just requires either adding the extension to 'program-extensions' or adding a shebang to the scripts, things that are extremely reasonable), if that would not be acceptable to upstream, then I think at least this should be made configurable. ---(snap)--- Proposed patch: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0001-Do-not-trigger-Policy-Modules-RequireVersionVar-on-p.patch;att=1;bug=706266 Regards, Salvatore