You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Jason J. Czerak" <Ja...@Jasnik.net> on 2001/05/17 15:03:53 UTC

Re[2]: NameWithVirtualHost

On Thu, 17 May 2001 08:04:31 -0400 Geoffrey Young <Geoffrey Young <gy...@laserlink.net>> wrote:

> 
> 
> > -----Original Message-----
> > From: Jason Czerak [mailto:jason@jasnik.net]
> > Sent: Wednesday, May 16, 2001 3:18 PM
> > To: modperl@apache.org
> > Subject: NameWithVirtualHost
> > 
> > 
> [snip] 
> > and the lines in startup.pl:
> > 
> > #! /usr/bin/perl
> > use strict;
> > use Apache::RegistryNG;
> > use CGI ();
> > use DBI ();
> > use DBD::Pg ();
> > 1;
> > 
> > nothing changes if the
> > $Apache::Registry::NameWithVirtualHost = 1 is in the
> > startup.pl or not.
> 
> well, you're not using Apache::Registry (which uses the
> $Apache::Registry::NameWithVirtualHost global)
> but Apache::RegistryNG (for which there's no corresponding
> $Apache::RegistryNG::NameWithVirtualHost :)
> 
> I haven't used RegistryNG at all, so I don't know the benefits of it over
> Registry (someone might) but I suspect that you
> will get the namespace isolation you desire if you move to Apache::Registry
> instead.
> 
> --Geoff
> 
>  
> 

I read that RegistryNG is supposed to be automatically
smarter about the namespace and I get the same effect
illreguardless if I use RegistryNG or Registry. Plus
RegistryNG is OO.

I since solved this problem tho. I went over every script
and added multi level module nameing. I did things like

domain_com::contact   for the 6 or 7 contact pages we have
and use the same idea for the 2 very complex site I'm
working on now. 

And yes, the name space isolation does work infact. but only
for the /index.pl (and any ohter scripts)  and the what not.
Tt doesn't protect the .pm or modules I load with in the 
name space or at server startup. Once loaded by any script 
it is useable by any script with in that child process even 
if the other scripts don't 'require' it it is still useable.
I dunno if this is proper for mod_perl's Registry but seems 
to be logical now that I had lots of time to mess with it. 


Or maybe I'm fooling my self. :) either way I'm getting work
done once again. :)


--
Jason J. Czerak (Jason-Czerak@Jasnik.net)
  Linux Systems Evangelist
  
Jasnik Services, LLC
  http://www.Jasnik.net