Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: sv_upgrade error

by wrinkles (Pilgrim)
on Nov 14, 2010 at 06:27 UTC ( #871290=note: print w/ replies, xml ) Need Help??


in reply to Re^3: sv_upgrade error
in thread sv_upgrade error

So I upgraded Text::CSV (and Text::CSV_XS)

$ perl -MText::CSV -e 'print "$Text::CSV::VERSION\n"' 1.06 $ eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib) $ perl -MText::CSV -e 'print "$Text::CSV::VERSION\n"' 1.20
And I'm getting somewhere, now I'm seeing a new error:
EHR - getline_hr () called before column_names () at myscript.pl line + 676
however I believe I called column_names:
# declare column names for getline_hr $csv->column_names($csv->getline($csv_fh)); # Build Array of HashRefs my @buttons; while (my $row = $csv->getline_hr($csv_fh)) { push(@buttons, $row) unless ($. == 1); }


Comment on Re^4: sv_upgrade error
Select or Download Code
Re^5: sv_upgrade error
by wrinkles (Pilgrim) on Nov 14, 2010 at 06:43 UTC
    OK I think I see the problem. getline IS called before column_names:
    $csv->column_names($csv->getline($csv_fh));
    Now to fix it...
      Nope, that's not it. The error is about getline_hr not getline. :(
Re^5: sv_upgrade error
by ikegami (Pope) on Nov 14, 2010 at 07:39 UTC
    Make sure that getline was successful
Re^5: sv_upgrade error
by Tux (Monsignor) on Nov 23, 2010 at 01:01 UTC

    As of Text-CSV_XS version 0.71, you can pass the auto_diag => 1 attribute to the new () constructor (actually already in version 0.66, but in 0.71 it was fully functional. For Text::CSV these were versions 1.14 and 1.17), and all diagnostics will be automatic.


    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-12-25 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls