00b75ead48
1.54 Sun Feb 10 21:35:02 PST 2008 Modify fromFileGetTopLines method, remove dependency on bytes bytes::substr causes infinite loop in some older version of perl 1.53 Thu Jan 3 21:13:40 PST 2008 add "use bytes" to Table.pm Just patched test.pl, because some OS cannot open in-memory file. 1.52 Fri Dec 14 11:48:42 PST 2007 1.51 Wed Dec 12 15:36:22 PST 2007 1. Add a class methods Data::Table::fromFile(file_name), which can guess the file format and call fromCSV/fromTSV internally. fromFile relies on the following new methods fromFileGuessOS(file_name) fromFileGetTopLines($file_name, $OS, $lineNumber) fromFileIsHeader($string) fromFileGuessDelimiter($arrayRefToLines) to figure out if the input file is from UNIX/PC/MAC, whether its first row contains column headers, and whether it uses ",", "\t" or ":" as field delimiters. It then calls either fromCSV or fromTSV to return the table object. $t = Data::Table::fromFile("myFileName_CSVorTSV_HeaderOrNoHeader_UNIXorPCorMAC "); Please refers to the updated document for details. 2. When fromFile/fromCSV/fromTSV reads from an empty file, it returns an undef object, rather than quit. 3. Provide more informative error message, when invalid column header is found . 4. fixed a bug in 1.51 where fromFileGuessOS failed in Windows Thanks to patches provided by "whitebell". |
||
---|---|---|
.. | ||
DESCR | ||
distinfo | ||
Makefile |