Elizabeth Barham wrote: > Hi, > > I have been developing a web application using Apache and mod_perl. It > consists of a single CGI perl script and many, many modules. The > application was originally developed with perl 5.6. > > I moved it onto an i386 box running perl 5.005 and now there is a > particular issue that I'm having trouble understanding. What happens > is that an included module 'require's another module, but it's @INC is > different than the one defined in the original, single CGI script. > > While one quick fix would be to simply add "use lib '.'" to the > beginning of this particular module, I would rather diagnose the > problem as I wonder why it's having this trouble. > > The error displayed using CGI.pm's carp is: > > Can't locate Time/DaysInMonth.pm in @INC (@INC > contains: > /usr/lib/perl5/5.005/i386-linux /usr/lib/perl5/5.005 > /usr/local/lib/site_perl/i386-linux > /usr/local/lib/site_perl > /usr/lib/perl5 . /etc/apache/ /etc/apache/lib/perl) at > ../lib/perl/Time/ParseDate.pm line 896 > > This does not include the directory included using use libs: > > use lib "../lib/perl"; > > in the one cgi-bin file. The funny thing about this is that the module > that is throwing the error's location happens to be > "../lib/perl/Time/ParseDate.pm", which includes: > > require Time::DaysInMonth. > > Is there an easy solution to this? Am I missing something?
Elizabeth, if I understand you correctly one of the modules adjusts @INC but other modules relying on this don't see the adjusted @INC. Changing the @INC value at server startup will solve this problem. For more info please read: http://perl.apache.org/guide/porting.html#_INC_and_mod_perl -- _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/