|Keep It Simple, Stupid|
Is there a fail-safe way to import variables from other modules?by joecamel (Hermit)
|on Nov 21, 2000 at 08:01 UTC||Need Help??|
Contributed by joecamel
on Nov 21, 2000 at 08:01 UTC
Q&A > debugging
Description:I am running mod_perl for Apache and I have always accessed vars from other modules using the following notation:
my $localVar = $OUTER::INNER::variable;
However, on my present project, this returns an undefined value about 30% of the time. Each time I hit refresh, it's a gamble. It fails most often after restarting the server and killing all httpd processes.
I've also tried simply "use"ing the module and accessing the vars without specifying the full package name, yielding the same results.
Does anyone know if this is a mod_perl issue and if there is a more fail-safe way of accessing package vars?
Please (register and) log in if you wish to add an answer