in reply to RFC: vars::i - Perl pragma to declare and simultaneously initialize global variables.

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' }

  • Comment on Re: RFC: vars::i - Perl pragma to declare and simultaneously initialize global variables.
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: RFC: vars::i - Perl pragma to declare and simultaneously initialize global variables. (our)
by Aristotle (Chancellor) on Jun 09, 2003 at 00:04 UTC
Re: Re: RFC: vars::i - Perl pragma to declare and simultaneously initialize global variables.
by PodMaster (Abbot) on Jun 08, 2003 at 13:16 UTC
    For the same reasons people still use vars (think of it as an extension of vars).


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.

      For the same reasons people still use vars (think of it as an extension of vars).

      And what is the reason for using vars? Is it 5.00x-compatibility or is it because people dislike our? (In which case I'd still like an explanation :)

      Whatever the reason is, I think you should document it.

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }