[prog] @INC in Perl
Jacinta Richardson
jarich at perltraining.com.au
Tue Apr 27 10:59:06 EST 2004
> In a bash script, I have used the command 'lwp-request' to get the
> contents of a web-page. This works fine.
>
> But if I add the option '-o text', I get this error message:
>
> Can't locate HTML/Parse.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/bin/lwp-request line 436.
>
> I have perl-libwww-perl-5.65-6 installed and also
> perl-Parse-Yapp-1.05-30. Parse.pm exists in
> /usr/lib/perl5/vendor_perl/5.8.0/Parse/Yapp/ .
First of all HTML::Parse is not the same as HTML::Parser. You really do
want to remove the sym-link you have put between the two.
I'm not sure why you're getting this error. Is the full path to
Parse.pm /usr/lib/perl5/vendor_perl/5.8.0/Parse/Yapp/HTML/Parse.pm?
A Parse.pm in a directory not called HTML will not be considered the
right file by Perl.
I saw in another reply that you used the CPAN shell to install
HTML::Parse. If you can determine where that is installed I can probably
help you further. Hopefully it's somewhere like:
/usr/lib/perl5/vendor_perl/5.8.0/HTML/Parse.pm
If you could also let me know how exactly you're calling lwp-request from
your bash script I can probably help you further.
> I imagine that I need to add this directory to @INC. How do I do
> this? (Sorry, I'm not familiar with Perl.)
It depends on how you're calling lwp-request. If you let me know I'll
give you a list of your options.
All the very best,
Jacinta
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
More information about the Programming
mailing list