in reply to Re: DBD::CSV limitation versus aging/unmaintained modules
in thread DBD::CSV limitation versus aging/unmaintained modules

Unfortunately no two of these have compatible APIs.

Been a while since I used any of these (although for speed I used CSV_XS and for flexibility I use your xSV), but I seem to recall that CSV_XS and CSV are interface compatible. What am I forgetting?


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Replies are listed 'Best First'.
Re: Re: Re: DBD::CSV limitation versus aging/unmaintained modules
by tilly (Archbishop) on Jan 15, 2004 at 22:25 UTC
    Hmm..my memory was bad. With Text::CSV you pass in the line to parse() while with Text::CVS_XS you pass in the filehandle to getline(). However looking at it I notice that Text::CSV_XS also offers the parse() interface. So I was wrong, they are compatible after all.

    However naive code using the parse() interface will break on embedded newlines. If you want to use Text::CSV, then I'd strongly recommend writing your own getline() function, and then using that.