use vars::i '$VERSION' => 3.44; use vars::i '@BORG' => 6 .. 6; use vars::i '%BORD' => 1 .. 10; use vars::i '&VERSION' => sub(){rand 20}; use vars::i '*SOUTH' => *STDOUT;
our $VERSION = 3.44; our @BORG = (6); our %BORD = 1 .. 10; our *SOUTH = *STDOUT; sub VERSION () { rand 20 }
Are you still living in 5.00x-land, or do you for some reason dislike our (in which case please explain (I think lexical declaration is a Good Thing))?
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: RFC: vars::i - Perl pragma to declare and simultaneously initialize global variables.
by Juerd
in thread RFC: vars::i - Perl pragma to declare and simultaneously initialize global variables.
by PodMaster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |