Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

installing text::csv cpan

by shushant (Novice)
on Jul 03, 2013 at 07:43 UTC ( [id://1042174]=perlquestion: print w/replies, xml ) Need Help??

shushant has asked for the wisdom of the Perl Monks concerning the following question:

sorry for asking this question again , this is because I could not resolve the issue.

so i have used  use Text::CSV ; in my code and when I try to run it by cmd , it gives an error . the error says

Can't locate Text/CSV.pm in @INC (@INC contains: C:/strawberry/perl/site/lib C:/ strawberry/perl/vendor/lib C:/strawberry/perl/lib .) at C:\Documents and Setting s\x0199665\Desktop\ke\first_time_userl.pl line 90. BEGIN failed--compilation aborted at C:\Documents and Settings\x0199665\Desktop\ ke\first_time_userl.pl line 90.

I am using strawberry perl , but when i write ppm it gives a Perl Package Manager window as well . So I know the question is pretty nube , but I have never worked with cpan before , so help will be much appreciated

Replies are listed 'Best First'.
Re: installing text::csv cpan
by Corion (Patriarch) on Jul 03, 2013 at 07:45 UTC

    Are you really, really sure that you only have one perl.exe on your machine? The symptoms you describe seem to point to you installing a module in one version of Perl but then running a different version of Perl.

    Alternatively, the following should Just Work with Strawberry Perl:

    cpan Text::CSV

      I'm sure this is the case for him. In his other thread he mentioned that it runs ok within Padre, but not when he runs it from the command line. This is a classic example of Padre using Padre's perl, and the command line using some other Perl (on Windows, I guess this means some registry configuration).

      Also, in this thread he discussed running ppm, which is Active State, but also mentioned that he's using Strawberry Perl. So there you have it; Padre is configured with the Active State Perl as its environment, and from the command line he's using Strawberry. They won't be (and shouldn't be) sharing libraries. They are probably not even binary compatible since Active Perl is usually built with MSVC, and Strawberry with gcc.


      Dave

Re: installing text::csv cpan
by marto (Cardinal) on Jul 03, 2013 at 08:42 UTC

    This is already under discussion in your previous thread. What problems did you have with the answers given there? Have you tried the suggestions given? Have you spoken to your systems/network administrator?

      I have strawberry perl only and I run my script it gives this error

      C:\Documents and Settings\x0199665\Desktop\ke>first_time_userl.pl Can't locate Text/CSV.pm in @INC (you may need to install the Text::CS +V module) (@INC contains: C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/ +lib C:/str awberry/perl/lib .) at C:\Documents and Settings\x0199665\Desktop\ke\f +irst_time_ userl.pl line 90. BEGIN failed--compilation aborted at C:\Documents and Settings\x019966 +5\Desktop\ ke\first_time_userl.pl line 90.

      and my line 90 is use Text::CSV; so I did this cpan Text::CSV; it gave this error

      C:\Documents and Settings\x0199665\My Documents>cpan Text::CSV CPAN: CPAN::SQLite loaded ok (v0.202) CPAN: LWP::UserAgent loaded ok (v6.05) CPAN: Time::HiRes loaded ok (v1.9725) Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl +.com:80 (B ad hostname)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. Fetching with LWP: http://www.cpan.org/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to www.cpan.org:80 (Ba +d hostname )] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. Fetching with LWP: http://www.cpan.org/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to www.cpan.org:80 (Ba +d hostname )] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\Windows +\system32\ ftp.exe' to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2248'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp "" o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl +.com:80 (B ad hostname)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. Fetching with LWP: http://www.cpan.org/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to www.cpan.org:80 (Ba +d hostname )] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. Fetching with LWP: http://www.cpan.org/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to www.cpan.org:80 (Ba +d hostname )] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01 +mailrc.txt .gz.tmp2248'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\Windows +\system32\ ftp.exe' to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2248'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp "" o conf commit CPAN: YAML::XS loaded ok (v0.41) Please check, if the URLs I found in your configuration file (http://cpan.strawberryperl.com/, http://www.cpan.org/, http://www.cpan.org/) are valid. The urllist can be edited. E.g. with +'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz

        Clicking http://cpan.strawberryperl.com/authors/01mailrc.txt.gz downloads a file for me, if it works for you from your desktop then this suggests you need to configure cpan to allow it to use your proxy. I mentioned reading the documentation for this in your previous thread, have you done so?

        To kick off the configuraiton within the cpan shell:

        C:\>cpan cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help. cpan> o conf init /proxy/ some questions here which you answer cpan> o conf commit

        If in doubt as to what these settings should be speak to your systems or network administrator. Also please use the formatting used on this site for code and errors: How do I post a question effectively?.

        Update: Fixed broken link.

        You have a proxy between your machine and the internet. Please ask your system and/or your network administrator for how to properly set up HTTP connectivity to the outside.

Re: installing text::csv cpan
by hippo (Bishop) on Jul 03, 2013 at 08:25 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1042174]
Approved by Happy-the-monk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-24 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found