Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding a library to the @INC array in perl
    primarykey
    data
    text
    <p>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 </p> <p><code>Can't locate WWW/Curl.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.6/x86_...</code></p> <p>When I type the following in the command line:</p> <p>rpm -ql curl</p> <p>I get:</p> <pre><code>/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. </code></pre> <p>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.</p> <pre><code>BEGIN { unshift(@INC, '/usr/lib/libcurl.so.3'); use WWW::Curl; } </code></pre> <p>When I type </p> <pre><code>cpan&gt; i /WWW::curl/ </code></pre> <p>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?</p> <pre><code>cpan&gt; 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 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload