Click here to get back home

Perl unable to find modules

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Perl unable to find modules babumovva@hotmail.com 08-12-2004
Get Chitika Premium
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]#


Posted by Gunnar Hjalmarsson on August 12, 2004, 10:42 pm
Please log in for more thread options
babumovva@hotmail.com wrote:
> 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.

<snip>

> [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:

It's not DBI/ProfileDumper/Apache.pm it can't locate, it's Apache.pm,
which probably is used or required by DBI/ProfileDumper/Apache.pm.

> [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]#

Probably it appears to work here because the current directory is
included in @INC, so when it comes to

use Apache.pm;

it considers itself to be that module... The actual Apache.pm is
still missing.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


Similar ThreadsPosted
Unable to install 'Msql-Mysql-modules' July 27, 2005, 3:50 am
How to find all modules, required by a given CPAN module September 4, 2005, 2:25 am
unable to connect to SuSE using net::ssh::perl module March 9, 2006, 10:23 pm
Unable to connect a website using LWP February 23, 2006, 4:31 am
Unable to load module March 16, 2006, 12:00 am
Sockets - client unable to connect May 1, 2006, 5:28 pm
Compress::Zlib unable to inflate July 24, 2006, 3:52 am
Unable to set the XValues property of the Series class November 9, 2005, 10:29 am
DBD::Unify on AIX : error -59 unable to attach to shared memory. July 8, 2006, 11:24 pm
Perl PDF modules - help please August 11, 2004, 2:31 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap