in reply to Re^2: Variable declaration in 'required' file doesn't work under 'strict'?
in thread Variable declaration in 'required' file doesn't work under 'strict'?
Rather than using the vars pragma, I would recommend using package variables:In what way are variables declared with the vars pragma not package variables?
This will prevent you from accidentally updating your config variables from your script.It will also prevent you from accessing the keys of the %state_name_for hash, since in your last example it is a lexical scoped my variable not visible in config.pl.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Variable declaration in 'required' file doesn't work under 'strict'?
by agianni (Hermit) on Mar 12, 2007 at 12:57 UTC | |
by Anno (Deacon) on Mar 12, 2007 at 13:27 UTC |