in reply to use vars vs our vs $main:: for $VERSION
use vars qw($VERSION);$VERSION=1.3; is needed only if you want compatibility with ancient versions of perl 5 (older than 5.6.0).
our $VERSION=1.3; works perfectly with any perl since 5.6.0 (released 9.5 years ago).
$main::VERSION=1.3; is just wrong, unless you want to set the VERSION of the main package. Did you mean $What::Ever::Package::VERSION=1.3;? That should work with every perl 5.x, but needs more typing.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use vars vs our vs $main:: for $VERSION
by bv (Friar) on Sep 26, 2009 at 13:41 UTC |