bv has asked for the wisdom of the Perl Monks concerning the following question:
So I wanted to use Getopt::Long's auto_version feature on a script that I use. It requires a package variable named $VERSION to be set, and I have at least three options for doing so:
use vars qw($VERSION); $VERSION = 1.3;
I have verified that all of these work, and I understand that the first two allow me to refer to the variable as $VERSION within package and lexical scope, respectively. My question is: Is any one of these preferable? I don't plan on referring to the version number anywhere else in the script.
| print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972))) |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use vars vs our vs $main:: for $VERSION
by cdarke (Prior) on Sep 25, 2009 at 16:28 UTC | |
|
Re: use vars vs our vs $main:: for $VERSION
by toolic (Bishop) on Sep 25, 2009 at 17:06 UTC | |
|
Re: use vars vs our vs $main:: for $VERSION
by afoken (Chancellor) on Sep 26, 2009 at 10:09 UTC | |
by bv (Friar) on Sep 26, 2009 at 13:41 UTC | |
|
Re: use vars vs our vs $main:: for $VERSION
by JavaFan (Canon) on Sep 29, 2009 at 10:22 UTC |