in reply to Global variables in Perl
our $DEBUG; <-- 1 use ConfigThisJunk qw ( $DEBUG ); <-- 2
The print sees the former. Get rid of our $DEBUG; in the main pacakge.
As an aside, I suggest you change
toour $DEBUG = 1;
in order to avoid spurious "used only once" warnings if you decide to douse vars qw( $DEBUG ); $DEBUG = 1;
use ConfigThisJunk; print $ConfigThisJunk::DEBUG;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Global variables in Perl
by taioba (Acolyte) on Jun 03, 2010 at 19:07 UTC | |
by ikegami (Patriarch) on Jun 03, 2010 at 19:10 UTC |