Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: The future of Text::CSV_XS - TODO

by Tux (Canon)
on Dec 25, 2010 at 10:53 UTC ( [id://879144]=note: print w/replies, xml ) Need Help??


in reply to The future of Text::CSV_XS - TODO

Here's my X-Mas present:

0.80 - 2010-12-24

  • Implement getline_all () and getaline_hr_all ()
  • Fixed another parsing for eol = \r (RT#61525)

0.79 - 2010-11-26

  • Use correct type for STRLEN (HP-UX/PA-RISC/32)
  • More code coverage
  • EOF unreliable when line-end missing at eof

0.78 - 2010-11-26

  • Version 0.77 broke MacOS exported CSV files with only \r

The two new methods:

  • getline_all
    $arrayref = $csv->getline_all ($io); $arrayref = $csv->getline_all ($io, $offset); $arrayref = $csv->getline_all ($io, $offset, $length);

    This will return a reference to a list of getline ($io) results. In this call, keep_meta_info is disabled. If $offset is negative, as with splice (), only the last abs ($offset) records of $io are taken into consideration.

    Given a CSV file with 10 lines:

    lines call ----- --------------------------------------------------------- 0..9 $csv->getline_all ($io) # all 0..9 $csv->getline_all ($io, 0) # all 8..9 $csv->getline_all ($io, 8) # start at 8 - $csv->getline_all ($io, 0, 0) # start at 0 first 0 rows 0..4 $csv->getline_all ($io, 0, 5) # start at 0 first 5 rows 4..5 $csv->getline_all ($io, 4, 2) # start at 4 first 2 rows 8..9 $csv->getline_all ($io, -2) # last 2 rows 6..7 $csv->getline_all ($io, -4, 2) # first 2 of last 4 rows
  • getline_hr_all
    $arrayref = $csv->getline_hr_all ($io); $arrayref = $csv->getline_hr_all ($io, $offset); $arrayref = $csv->getline_hr_all ($io, $offset, $length);

    This will return a reference to a list of getline_hr ($io) results. In this call, keep_meta_info is disabled.


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found