Text::CSV is actually only a thin wrapper for Text::CSV_XS (prefered) and Text::CSV_PP (fallback).
it seems that Text::CSV [...] can only deal with ascii characters.
Both implementation can handle binary characters (with Binary=>1). In fact, both implementations have the same interface and capabilities.
I looked at both modules and it seems that Text::CSV is the older module
Both are kept in sync. Both had a released in the last two months.
The only differences should be
- Text::CSV_XS is faster
- Text::CSV_XS can be harder to install for some people.
| [reply] [d/l] |
| [reply] |
As ikegami already mentioned, Text::CSV is just a wrapper over Text::CSV_XS nowadays, but what he did not mention is that Text::CSV bundles Text::CSV_PP which is the pure-perl implementation of Text::CSV_XS.
Text::CSV_XS is about 50 times faster than the pure-perl version. Text::CSV is the module of choice, which you can speed up, even afterwards, by installing the XS version.
I maintain the XS version, and communicate with the author of the pure-perl version, so once Text::CSV_XS is updated to a new release, the wrapper modules can follow within days with the matching pure-perl version.
Enjoy, Have FUN! H.Merijn
| [reply] |
Aside from the differences you mentioned, the XS version should be somewhat faster, or perhaps consume less memory.
XS stands for eXternal Subroutine, and is a method for writing perl functions in C. This is used extensively to either tie existing C libraries to perl, or to write more efficient or faster functions.
PerlXS is the documentation page on XS if you are interested.
Generally module names containing XS denote that some or all of the module is in fact written in C.
I am making the assumption that because you asked what other reasons there are for using the XS version, you didn't know this. My apologies if I am incorrect.
| [reply] |