You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tim Gerla <ti...@rrv.net> on 2002/06/26 17:29:54 UTC

Like-named perl modules in separate directories

I've got a problem with a perl module (.pm) problem on my server. I've
got two slightly different versions of a file: Conf.pm, in two separate
places on my server. (Let's call them /home/www/docs/web/cgi/ and
/home/www/docs/minos/cgi/) Mod_perl apparently keeps caching one or the
other, causing interesting problems if I hit a 'web' script, and then a
'minos' script a few minutes later. 

What's the best way to get around this?

Thanks,

-Tim

Re: Like-named perl modules in separate directories

Posted by darren chamberlain <dl...@users.sourceforge.net>.
* Tim Gerla <ti...@rrv.net> [2002-06-26 11:33]:
> I've got a problem with a perl module (.pm) problem on my server. I've
> got two slightly different versions of a file: Conf.pm, in two
> separate places on my server. (Let's call them /home/www/docs/web/cgi/
> and /home/www/docs/minos/cgi/) Mod_perl apparently keeps caching one
> or the other, causing interesting problems if I hit a 'web' script,
> and then a 'minos' script a few minutes later. 
> 
> What's the best way to get around this?

Use different namespaces for the two modules.

(darren)

-- 
All is fear in love and war.

Re: Like-named perl modules in separate directories

Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 17:29 26.06.2002, Tim Gerla wrote:
>I've got a problem with a perl module (.pm) problem on my server. I've
>got two slightly different versions of a file: Conf.pm, in two separate
>places on my server. (Let's call them /home/www/docs/web/cgi/ and
>/home/www/docs/minos/cgi/) Mod_perl apparently keeps caching one or the
>other, causing interesting problems if I hit a 'web' script, and then a
>'minos' script a few minutes later.
>
>What's the best way to get around this?

RTFM :)
http://perl.apache.org/release/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs

You should read the whole mod_perl guide. You'll be out of questions 
afterwards :)


-- 
Per Einar Ellefsen
per.einar@skynet.be