RE: Global Variables - What is in Memory?

[prev] [thread] [next] [Date index for 2004/11/05]

From: Perrin Harkins
Subject: RE: Global Variables - What is in Memory?
Date: 17:26 on 05 Nov 2004
On Fri, 2004-11-05 at 12:18, Justin Luster wrote:
> So what you are saying is that 
> 
> http://www.mysite.com/one/MyAdmin.pl
> and
> http://www.mysite.com/two/MyAdmin.pl
> 
> get different package names (because they are in different directories)
> and so stay separate, but because I have declared a package inside of
> them with a common name that package goes into a common package name and
> will be shared by both scripts?

Yes.  Symbols like subs and globals go into the current package. 
(Packages have no relation to file names, except that "use My::Foo" will
try to guess a file name based on what you give it.)  You've declared
the same package in both places, so one is overwriting the other.

The link that Malcolm gave provides a good description of what happens
to your script when you run it under Registry.

- Perrin


        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Global Variables - What is in Memory?
Justin Luster 02:53 on 05 Nov 2004

Re: Global Variables - What is in Memory?
Malcolm J Harwood 15:09 on 05 Nov 2004

[mp2] Apache::DBI and Apache::Status
Scott Scecina 15:53 on 05 Nov 2004

Re: [mp2] Apache::DBI and Apache::Status
Stas Bekman 21:22 on 05 Nov 2004

RE: Global Variables - What is in Memory?
Justin Luster 16:50 on 05 Nov 2004

Re: Global Variables - What is in Memory?
Malcolm J Harwood 17:22 on 05 Nov 2004

RE: Global Variables - What is in Memory?
Justin Luster 17:37 on 05 Nov 2004

Re: Global Variables - What is in Memory?
Perrin Harkins 17:02 on 05 Nov 2004

RE: Global Variables - What is in Memory?
Justin Luster 17:18 on 05 Nov 2004

RE: Global Variables - What is in Memory?
Perrin Harkins 17:26 on 05 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52