Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Re: what is the meaning of $:: ?
- Rainer Weikusat
May 16, 2012, 3:18 pm
rate this thread
Re: what is the meaning of $:: ?
That's correct. The 'empty package' is a synonym for package main; it
behaves like a symlink /main -> / in the filesystem. So $::VERSION,
$main::VERSION and $main::main::VERSION all refer to the same variable,
and (since they are all package-qualified) will all be allowed by 'use
Myself, I'd rather use 'our' in package main, since that matches what
you do inside a module.
- » Providing default values (missing?) in Getopt::Declare ?
- — Next thread in » PERL Discussions