You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Arun Theeban <at...@yahoo.com> on 2001/02/28 14:44:04 UTC

Duplicate entries in @INC

Hi All,
I am using a linux box,with apache server,mod-perl.

I have put my own modules in a directory and  added
the directory into @INC in my "startup.pl" file of the
Apache Server.(I used "qw" to do that).

All my programs works fine. 

But when I print all the values of @INC in mod-perl
through browser ,I see duplicate entries for my
directory.But under CGI, I don't see any

What might be the reason? 

-Thanks
Arun

-Thanks
Arun

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: Duplicate entries in @INC

Posted by Perrin Harkins <pe...@primenet.com>.
> But when I print all the values of @INC in mod-perl
> through browser ,I see duplicate entries for my
> directory.But under CGI, I don't see any
>
> What might be the reason?

I can think of two possibilities.  First, you might be adding
/usr/local/apache/lib/perl (or where ever your Apache lives + /lib/perl) to
@INC, which mod_perl does automatically.  Second, your startup.pl may be
running twice because Apache runs the config file twice on startup.  Stas
posted a message a few days ago about seeing files pulled in from
PerlModule/PerlRequire commands running twice on startup, even though they
probably shouldn't.  See
http://forum.swarthmore.edu/epigone/modperl/crachoupro/Pine.LNX.4.30.0102231
704280.14560-100000@stas.extropia for more info and a workaround.

- Perrin


Re: Duplicate entries in @INC

Posted by Stas Bekman <st...@stason.org>.
On Wed, 28 Feb 2001, Arun Theeban wrote:

> Hi All,
> I am using a linux box,with apache server,mod-perl.
>
> I have put my own modules in a directory and  added
> the directory into @INC in my "startup.pl" file of the
> Apache Server.(I used "qw" to do that).
>
> All my programs works fine.
>
> But when I print all the values of @INC in mod-perl
> through browser ,I see duplicate entries for my
> directory.But under CGI, I don't see any
>
> What might be the reason?
>
> -Thanks
> Arun
>
> -Thanks
> Arun

That's because you sig is duplicated :)

startup.pl has no influence for mod_cgi (what you call CGI). Check whether
you have PERL5LIB env var set in the shell...

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/