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

Text::CSV shouldn't be that hard to use. I must be having a moron-in-brain moment. Can someone point out my lunacy here (other than working in a Windows environment; that one's not my choice per se)?

1. I downloaded Text-CSV-0.01.tar.gz
2. I unpacked CSV.pm and put it in C:\Perl\site\lib\Text
3. I wrote the following test script:

#!/usr/bin/perl -w use strict; use Text::CSV; my $csvobj = new Text::CSV; my $csvver = $csvobj->version(); print "Successfully loaded and invoked Text::CSV v$csvver\n"; exit;

4. I ran it, with the following rather unexpected output:

D:\Steve\Perl>perl test-text-csv.pl Can't locate auto/Text/CSV/autosplit.ix in @INC (@INC contains: D:/Ste +ve/Perl C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/lib/AutoLoader.pm +l ine 160. at C:/Perl/site/lib/Text/CSV.pm line 23 Can't locate auto/Text/CSV/new.al in @INC (@INC contains: D:/Steve/Per +l C:/Perl/lib C:/Perl/site/lib .) at test-text-csv.pl line 7

So -- where's my brain damage?

Janitored by Arunbear - replaced pre tags with code tags (to prevent distortion of site layout).

Replies are listed 'Best First'.
Re: AutoLoader Failure?
by gellyfish (Monsignor) on Apr 28, 2006 at 15:12 UTC

    Your problem is with copying the files rather than using the established mechanism for installing the module Text::CSV can be installed on Windows using PPM:

    S:\>ppm install Text-CSV

    /J\

      That was it -- thanks!

      Now to go back and see if those installation instructions were anywhere on the page and I just failed to RTFM or what.

      I take it from your comment this is a really standard way to add CPAN modules now? Very nice. Saves the hassle of reparsing where the site/lib directory is located every time.

      Thanks again!

        On Windows and if you are using the Activestate perl, it is the best place to start yes. On other platforms you need to follow the installation instructions provided in the README for the module.

        /J\

Re: AutoLoader Failure?
by neilwatson (Priest) on Apr 28, 2006 at 15:09 UTC
    I not up on Windows but, I believe, like UNIX, you have to install the tar ball not just unpack it. Did you actually look at it's contents?

    Neil Watson
    watson-wilson.ca

Re: AutoLoader Failure?
by Anonymous Monk on Apr 30, 2006 at 22:18 UTC