in reply to Note on usage of ours variables and a question
> I would like to avoid qualification with package name a variable that I use in many modules in many situations. For example, variable debug.
TIMTOWTDI
The following makes the variable $Debug::DEBUG available as $DEBUG for the rest of the file
use strict; use warnings; package Debug; our $DEBUG; package MyPkg; print $DEBUG if $DEBUG;
but I'd rather use a constant.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
---|
In Section
Seekers of Perl Wisdom