Re: A question about the dumplicated named global variables

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 11/09/2012 06:40 AM, Feng He wrote:
> Nobody knows this item?

I think you didn't get an answer here because the question is not
related to modperl. It's purely perl matter.

Exporting a variable out of package A into package X means something like

  *X::var=\$A::var;

Now, you have to figure out what happens to $X::var if you do

  *X::var=\$A::var;
  *X::var=\$B::var;

as you do in startup.pl and what happens if you do

  *Y::var=\$A::var;

and

  *Z::var=\$B::var;

as you do in the 2 handlers.

BTW, to avoid confusion I'd prevent the import() function from being
called in startup.pl by either

  use Config1 ();
  use Config2 ();

or

  BEGIN {
    require Config1;
    require Config2;
  }

Torsten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.