1Perl::Critic::Policy::MUosdeurleCPsoe:nr:tlRr:ei:qbCuuritiretediVceP:re:srPiloolnDiVocacyru:(m:3eM)notdautlieosn::RequireVersionVar(3)
2
3
4

NAME

6       Perl::Critic::Policy::Modules::RequireVersionVar
7

DESCRIPTION

9       Every Perl file (modules, libraries, and programs) should have a $VER‐
10       SION variable.  The $VERSION allows clients to insist on a particular
11       revision of your file like this:
12
13         use SomeModule 2.4;  #Only loads version 2.4
14
15       This Policy scans your file for any package variable named $VERSION.
16       I'm assuming that you are using "strict", so you'll have to declare it
17       like one of these:
18
19         our $VERSION = 1.051;
20         $MyPackage::VERSION = 1.051;
21         use vars qw($VERSION);
22
23       A common practice is to use the "$Revision: 1323 $" keyword to automat‐
24       ically define the $VERSION variable like this:
25
26         our ($VERSION) = '$Revision: 1323 $' =~ m{ \$Revision: \s+ (\S+) }x;
27

NOTES

29       Conway recommends using the "version" pragma instead of raw numbers or
30       'v-strings.'  However, this Policy only insists that the $VERSION be
31       defined somehow.  I may try to extend this in the future.
32

AUTHOR

34       Jeffrey Ryan Thalhammer <thaljef@cpan.org>
35
37       Copyright (c) 2005-2007 Jeffrey Ryan Thalhammer.  All rights reserved.
38
39       This program is free software; you can redistribute it and/or modify it
40       under the same terms as Perl itself.  The full text of this license can
41       be found in the LICENSE file included with this module.
42
43
44
45perl v5.8.8                Perl::C2r0i0t7i-c0:3:-P2o0licy::Modules::RequireVersionVar(3)
Impressum