|
Posted by babumovva@hotmail.com on August 12, 2004, 12:58 pm
Please log in for more thread options
Hi,
I was trying to port a Perl module developed by someone else.
In the process I encountered the problem that Perl is unable to find a
particular module. Then I checked for the @INC directories involved
and changed directory to the module where it resides. Then it was
able to find the module. I reproduce below the screen shots on how
this is happening. I am unable to understand why Perl is unable to
locate the module even though the @INC seems to be correct.
Thanks for the help
babumovva
[root@localhost tmp]# pwd
/home/babu/tmp
[root@localhost tmp]# cat tst.pl
#!/usr/bin/perl
use DBI::ProfileDumper::Apache;
print $DBI::ProfileDumper::Apache::VERSION,"n";
[root@localhost tmp]# ./tst.pl
Can't locate Apache.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3
/usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl .) at
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/DBI/ProfileDumper/Apache.pm
line 112.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/DBI/ProfileDumper/Apache.pm
line 112.
Compilation failed in require at ./tst.pl line 2.
BEGIN failed--compilation aborted at ./tst.pl line 2.
[root@localhost tmp]# cd
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/DBI/ProfileDumper
[root@localhost ProfileDumper]# /home/babu/tmp/tst.pl
1.0
[root@localhost ProfileDumper]#
|