in reply to Re^6: How not to use "our"?
in thread How not to use "our"?
Note also that if mod_perl means you cannot have globals, it would mean you cannot have Perl. Certain global variables always exist.
The issue with mod_perl is that modules get only compiled "once" (well, typically, once in the life time of an Apache child), and not each time the program is run. This means "globals" may not get (re)initialized. But that is not the same as package variables!. File scoped lexicals and sub-bounded state variables won't get (re)initialized either. And package variables that get initialized in your mod_perl program do get initialized.
The mod_perl issue all has to do when certain code is run - not whether variables are package variables or lexicals.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: How not to use "our"?
by Anonymous Monk on Nov 30, 2010 at 15:51 UTC | |
by JavaFan (Canon) on Nov 30, 2010 at 16:00 UTC |