David Gama Rodrí­guez wrote:

Tom Phoenix wrote:

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
Thank you so much for your help I read the link and I think the way I'm tryin to use the $hash is incorrect I will do it as Vishal said maybe storing the value in some place to be available in any request. Perhaps chapter 10 will help me more


Reply via email to