Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: CSV_XS issue

by Anonymous Monk
on Sep 04, 2013 at 19:20 UTC ( [id://1052420]=note: print w/replies, xml ) Need Help??


in reply to CSV_XS issue

That means $csv is undef.

What error do you get during the ->new operation?

Replies are listed 'Best First'.
Re^2: CSV_XS issue
by wassmp1 (Initiate) on Sep 04, 2013 at 19:49 UTC

    You're reply pointed me in the right direction - even though there were no error messages when I invoked ->new, I discovered that there is a diagnostic facility available if the "new" constructor fails. When I included it:

    my $csv = Text::CSV_XS->new ({ binary => 1 }) or die "".Text::CSV_XS->error_diag();

    It informed me that I was using an unsupported argument. Further investigation showed that the Linux version of CSV_XS was older than the Windows version, and apparently does not support the same set of arguments.

    Thanks for your help!

      auto_diag was added back in version 0.66, which was back in Aug 2009. If you are using a version that old, there are a lot of bugs to encounter still.

      You might have picked up the new (better) invocation from documentation not on your system. Reading docs from any resource other than the box your module is installed might always lead to inconsistencies.


      Enjoy, Have FUN! H.Merijn

      Yep... I was beginning to get suspicious.   Turns out that you were comparing Apples to Oranges, not Windows to Linux.   Please tell us what version of CSV_XS is installed on each, e.g.:

      perl -e 'use CSV::XS; print "CSV::XS->VERSION" . "\n";

      Insofar as possible, Perl is very much an “environment agnostic” programming tool.   But, heh, those environments sure can get interesting . . .

Re^2: CSV_XS issue
by wassmp1 (Initiate) on Sep 04, 2013 at 19:24 UTC

    I don't get any errors during the ->new operation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1052420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found