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

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

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



Subject: Perl::Critic::Policy::Modules::RequireVersionVar fails at *.pl script
At page 404, Chapter 17: Modules, Damian Conway describes to use the version module. The version number can used as use MyModule 1.23 qw(imports); How can I use my_script.pl? I can not. Why should I set a $VERSION number? The first code line in a *.pm file describes the package. After that a $VERSION should be found.
Subject: Re: [rt.cpan.org #43748] Perl::Critic::Policy::Modules::RequireVersionVar fails at *.pl script
Date: Sun, 01 Mar 2009 09:08:16 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Steffen Winkler via RT wrote: Show quoted text
> How can I use my_script.pl? I can not.
Sure you can: require 'my_script.pl'; Show quoted text
> Why should I set a $VERSION number?
Things like Getopt::Long can use it to automatically provide information to users (see the auto_version option). More importantly, if you're using consistent version numbers for all the modules in your distributions, including the version number in your program makes it possible to match that version with the modules so you know what belongs with what.
ok