I am running a script which requires the Curl.pm lib in order to work. I used YUM to install the library and now I am trying to have my script use it, but I keep getting the error
Can't locate WWW/Curl.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.6/x86_...
When I type the following in the command line:
rpm -ql curl
I get:
/usr/bin/curl
/usr/lib64/libcurl.so.3
/usr/lib64/libcurl.so.3.0.0
/usr/share/doc/curl-7.13.1
/usr/share/doc/curl-7.13.1/BUGS
/usr/share/doc/curl-7.13.1/CHANGES
/usr/share/doc/curl-7.13.1/COPYING
/usr/share/doc/curl-7.13.1/FAQ
...
/usr/share/man/man1/curl.1.gz
/usr/bin/curl
/usr/lib/libcurl.so.3
/usr/lib/libcurl.so.3.0.0
/usr/share/doc/curl-7.13.1
/usr/share/doc/curl-7.13.1/BUGS
/usr/share/doc/curl-7.13.1/CHANGES
... etc.
Which one of the paths above needs to be included in my @INC directory? I had thought that the code below would solve the problem when placed at the top of my script, but I am still getting the same error @INC error.
BEGIN {
unshift(@INC, '/usr/lib/libcurl.so.3');
use WWW::Curl;
}
When I type
cpan> i /WWW::curl/
I get the following list below. I'm still stumped. I want to use WWW::curl and I don't know which of the paths below (or above) to add to @INC ! It looks like it's already installed. What do I do from here?
cpan> i /WWW::curl/
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Mon, 30 Nov 2009 02:55:47 GMT
Module WWW::Curl (S/SZ/SZBALINT/WWW-Curl-4.09.tar.gz)
Module WWW::Curl::Easy (S/SZ/SZBALINT/WWW-Curl-4.09.tar.gz)
Module WWW::Curl::Form (S/SZ/SZBALINT/WWW-Curl-4.09.tar.gz)
Module WWW::Curl::Multi (S/SZ/SZBALINT/WWW-Curl-4.09.tar.gz)
Module WWW::Curl::Share (S/SZ/SZBALINT/WWW-Curl-4.09.tar.gz)
Module WWW::Curl::Simple (A/AN/ANDREMAR/WWW-Curl-Simple-0.05.tar.gz)
Module WWW::Curl::Simple::Request (A/AN/ANDREMAR/WWW-Curl-Simple-0.05.tar.gz)
7 items found