Since the pure perl is the fallback solution, and it does not require anything but perl (and well, if you're trying to install Text::CSV you probably have perl on your system), it's not really surprising to see CSV_PP is provided with Text::CSV (it's not installed at the same time, it's part of the module. So you can't have CSV_PP without Text::CSV being installed (or it was done on purpose for some reason)).

I don't see anything preventing Text::CSV_XS being installed without Text::CSV, so indeed, this might be an issue. But Text::CSV with its PP implementation is a fairly simple module: only to .pm files, without any compilation needed (that's actually why it exists, in case the compilation for XS fails), so it should be easy to install even "by hand" (unzip and perl Makefile.PL; make; make test; make install), or even just include without any installation in your program. Besides, its main benefit is that the implementation is abstracted away, and you get one unique interface for all your calls, so no my $csv = Text::CSV_PP->new vs my $csv = Text::CSV_XS->new, you just use Text::CSV and everything in the Text::CSV namespace will point to the right element, which was your second problem :) .


In reply to Re^3: Switching Modules as Necessary by Eily
in thread Switching Modules as Necessary by Melly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.