mod_perl and module versions

1999-12-22 Thread Waldek Grudzien

Hello everyone,

I have just started to play with mod_perl module I found
a problem with my own modules (many versions of the module with the same
name)
I have found related topic dated on 28 Apr 97 (mod_perl and module
versions),
but unfortunatelly there was no solution... ;-(

Lets say I have two directories :
/cgi-bin/dir1 i  /cgi-bin/dir2
and in every of them I have module conf.pm (configuration module).
Of course the first using one of the module causes cache'ying
it by mod_perl (using Apache::Registry or Apache::PerlRun).
When I use 'use conf' from the other dir it sees the first included
by perl_mod conf module (because it is present in global %INC)

How can I force own namespace (including %INC) in every dir
(application) ?

BTW Merry X-mas and happy Y2K ;o)

Best Regards,

Waldek Grudzien
_
http://www.uhc.lublin.pl/~waldekg/
University Health Care
Lublin/Lubartow, Poland
tel. +48 81 44 111 88
ICQ # 20441796



Re: mod_perl and module versions

1999-12-22 Thread darren chamberlain

Hi,

WHy not just put each conf module in it's own namespace? Dir1::Conf and
Dir2::Conf, for example. Then, you could stick them into a single lib
directory, and not have to worry about modifying @INC or caching issues.

Another option is to ensure that each script has a 'use lib' at the beginning
that has it's own conf.pm in it, but not the other scripts, although this
solution might only help with scripts running under Apache::PerlRun.

darren

Waldek Grudzien ([EMAIL PROTECTED]) wrote:
 Hello everyone,
 
 I have just started to play with mod_perl module I found
 a problem with my own modules (many versions of the module with the same
 name)
 I have found related topic dated on 28 Apr 97 (mod_perl and module
 versions),
 but unfortunatelly there was no solution... ;-(
 
 Lets say I have two directories :
 /cgi-bin/dir1 i  /cgi-bin/dir2
 and in every of them I have module conf.pm (configuration module).
 Of course the first using one of the module causes cache'ying
 it by mod_perl (using Apache::Registry or Apache::PerlRun).
 When I use 'use conf' from the other dir it sees the first included
 by perl_mod conf module (because it is present in global %INC)
 
 How can I force own namespace (including %INC) in every dir
 (application) ?
 
 BTW Merry X-mas and happy Y2K ;o)
 
 Best Regards,
 
 Waldek Grudzien
 _
 http://www.uhc.lublin.pl/~waldekg/
 University Health Care
 Lublin/Lubartow, Poland
 tel. +48 81 44 111 88
 ICQ # 20441796

-- 
My reality check just bounced.