B. Fongo wrote:
> Is it recommendable to use the pragma "use lib " when installing a
> program on a server shared by many users?
> Assuming my IPS did not install certain CPAN modules which my needs,
> and I decide to install them in my www directory.
> In such a scenario, putting "use lib" on my scripts will add my module
> directory to @INC - which in fact isn't desired.

This is only an issue under mod_perl, where @INC persists across requests
and would thus be shared by multiple scripts.

Under mod_cgi, the changes made by "use lib" affect only the current
process's copy of @INC, so there's nothing to be concerned about.

> 
> How can I avoid this situation?

You could try something like this if you're running under mod_perl:

   use lib '/my/lib/path';
   use MyModule;
   no lib '/my/lib/path';

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to