Stas Bekman wrote:

> On Thu, 3 Aug 2000, ___cliff rayman___ wrote:
>
> > "Keith G. Murphy" wrote:
> >
> > > ___cliff rayman___ wrote:
> > > >
> > > > The perl interpreter has a one global symbol table called the stash where
> > > > all global variables are referenced by package and by variable name.
> > > > Since the interpreter does not go away when a script is recompiled, neither
> > > > does the stash or any of the items contained within it.  Some programmers
> > > > are probably using this as a feature, and therefore it is unlikely that it
> > > > will change.
> > > > This is really standard perl stuff and it has nothing to do with
> > > > Apache::Registry in particular.  It is just something the average perl
> > > > programmer does not come across since we usually load the interpreter, load
> > > > a program, run the program, exit the interpreter.
> > > >
> > > > check out:
> > > > 
>http://thingy.kcilink.com/modperlguide/porting/Global_Variables_Persistence.html
> > > >
> > > Thanks for the info and the link.
> > >
> > > One note though.  The info in the link really doesn't pertain to my
> > > specific question:
> > >
> > > "global variables persist inside the same process from request to
> > > request"
> > >
> > > I knew that; I was surprised that they did even on a recompilation of
> > > the script, which the link info doesn't really refer to.
> >
> > i will see if i can find a good place in the guide to add it and i'll send stas the
> > patch.
>
> I'm not sure there is a need for a patch. I think you confuse,
> something. When the script is recompiled all the variables belonging to
> the package decalared by Apache::Registry or similar are getting reset. If
> you require/use() some modules that declare packages and have global
> variables -- these won't be reset unless reloaded or initialized in your
> code.

i am not sure i was crystal clear on that - thanks.  we might want to add something 
about
all of this to the guide however to make it all perfectly clear.  OR, maybe it is in 
there
and i have just not come across it yet.  i am making my full sweep through the guide 
now.

>
>
> > > *You* have straightened me out, on the other hand.
> > >
> > > So, lessee, BEGIN { somevar=somevalue; } ought to work for a variable I
> > > want reinitialized at compilation only...
>
> Not if you are talking about the scripts running under Apache::Registry
> and friends, please read the guide.
> http://perl.apache.org/guide/porting.html#BEGIN_blocks
>

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/


Reply via email to