*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> perl5/vars (3)              
Title
Content
Arch
Section
 

Contents


vars(3)								       vars(3)


NAME    [Toc]    [Back]

     vars - Perl pragma	to predeclare global variable names

SYNOPSIS    [Toc]    [Back]

	 use vars qw($frob @mung %seen);

DESCRIPTION    [Toc]    [Back]

     This will predeclare all the variables whose names	are in the list,
     allowing you to use them under "use strict", and disabling	any typo
     warnings.

     Unlike pragmas that affect	the $^H	hints variable,	the use	vars and use
     subs declarations are not BLOCK-scoped.  They are thus effective for the
     entire file in which they appear.	You may	not rescind such declarations
     with no vars or no	subs.

     Packages such as the AutoLoader and SelfLoader that delay loading of
     subroutines within	packages can create problems with package lexicals
     defined using my(). While the vars	pragma cannot duplicate	the effect of
     package lexicals (total transparency outside of the package), it can act
     as	an acceptable substitute by pre-declaring global symbols, ensuring
     their availability	to the later-loaded routines.

     See the section on	Pragmatic Modules in the perlmod manpage.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
subs IRIX Perl pragma to predeclare sub names
less IRIX perl pragma to request less of something from the compiler
constant IRIX Perl pragma to declare constants
strict IRIX Perl pragma to restrict unsafe constructs
integer IRIX Perl pragma to compute arithmetic in integer instead of double
ops IRIX Perl pragma to restrict unsafe operations when compiling
sigtrap IRIX Perl pragma to enable simple signal handling
locale IRIX Perl pragma to use and avoid POSIX locales for built-in operations
pthread_setconcurrency Tru64 Changes the value of the concurrency level global variable for this process
lbolt Tru64 Global Variable: Is a periodic wakeup mechanism
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service