Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: sv_upgrade error

by ikegami (Patriarch)
on Nov 14, 2010 at 04:21 UTC ( [id://871274]=note: print w/replies, xml ) Need Help??


in reply to sv_upgrade error

It's surely a bug inside the module. What version of Text::CSV and Text::CSV_XS do you have installed? Did you try upgrading them?

For the curious,

SVt_PVNV, /* 6 */ SVt_REGEXP, /* 8 */

If upgrading doesn't help, perhaps you could provide the data that causes the crash.

Replies are listed 'Best First'.
Re^2: sv_upgrade error
by wrinkles (Pilgrim) on Nov 14, 2010 at 04:47 UTC
    DreamHost shared hosting. So I checked:
    perl -MModule -e 'print "$Text::CSV::VERSION\n"'
    result
    Can't locate Module.pm in @INC (@INC contains: /etc/perl /usr/local/li +b/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/ +perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_per +l .). BEGIN failed--compilation aborted.
    Similar result for Text::CSV_XS. I think they recently updated to 5.10.0. But drop Text::CSV just like that? What are they thinking? I'll have to notify support and/or install locally.
    Thanks for the help!
      I can't reproduce it on DreamHost (twins.dreamhost.com) with the info you provided.
      $ cat a.pl use strict; use warnings; use feature qw( say ); use Text::CSV qw( ); use Encode qw( encode_utf8 ); say Text::CSV->VERSION; say Text::CSV->is_xs() ? 'xs' : 'pp'; say Text::CSV->version; my $csv = Text::CSV->new ({ allow_whitespace => 1, binary => 1, sep_char => '|', }) or die; my $csv_file = encode_utf8(<<'__EOI__'); foo|bar|baz dog|cat|cow __EOI__ open(my $csv_fh, "<:encoding(utf8)", \$csv_file) or die; say for $csv->column_names($csv->getline($csv_fh)); $ perl a.pl 1.06 xs 0.52 foo bar baz

      And with a locally installed Perl 5.12.1 on the same machine:

      $ perl a.pl 1.20 xs 0.74 foo bar baz

      Yes, they updated to 5.10.0 over the summer - broke my code on there only insofaras I had to recompile the CPAN modules I was using due to the binary incompatibilities. However, to answer the question, then:

      $ perl -MText::CSV_XS -le 'print $Text::CSV_XS::VERSION' 0.52
      Looks like the one on DreamHost is somewhat dated. You may want to do a local install of Text::CSV_XS in that case. Thus far, I've not hit into any similar issue with my DBD::CSV usage, as I don't seem to have a newer version on my account.

        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); }

        broke my code on there only insofaras I had to recompile the CPAN modules I was using due to the binary incompatibilities

        That made me wonder why INSTALL_BASE is recommended over PREFIX. Using the latter, XS modules would go missing rather than become invalid, and you could actually have multiple perl installs using the same lib dir (which is good since they all use the same ENV var to locate the lib dir).

        I just use perlbrew now.

      You're trying to load a module named "Module" instead of Text::CSV and Text::CSV_XS

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-23 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found