On 1/10/06, David Gama Rodrí­guez <[EMAIL PROTECTED]> wrote:
> I made a module that loads when Apache starts, in my module I declare a
> hash  as a global in order to be accesed in any place in my module,
>
> my $hash;

Not to be picky about terminology, but a "my" variable is a lexical
variable, not a global variable. I think what you're talking about
here is a file-scoped lexical variable: It's accessible by name from
the rest of its file, but not from code in any other files.

But because Apache will fork many separate server processes,
persistent variables, whether global or not, may show surprising
behavior. Here's some documentation that may help, or you can search
other mod_perl resources:

    http://modperlbook.org/html/ch06_04.html#pmodperl-CHP-6-SECT-4.3

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to