Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parse-CSV CPAN distribution.

Report information
The Basics
Id: 31389
Status: resolved
Priority: 0/
Queue: Parse-CSV

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.00
Fixed in: (no value)



Subject: WISH: expose 'fields' method
When using new( fields => 'auto' ), it can be useful to know which fields were discovered before a row is fetched. (For example: to use the fields to create a table based on the CSV field names before inserting into it). Text::CSV_XS can already do this with the fields() method. That method just needs to be exposed. Alternately, the whole Text::CSV_XS object could be exposed, or used as a parent class.
Subject: Re: [rt.cpan.org #31389] WISH: expose 'fields' method
Date: Wed, 12 Dec 2007 15:01:04 +1100
To: bug-Parse-CSV [...] rt.cpan.org
From: "Adam Kennedy" <adamkennedybackup [...] gmail.com>
I found that using Text::CSV_XS as a parent class didn't really work. For one, it's XS, so debugging is trickier, and for another I need to store extra information. It turned out that extending by encapsulation was much simpler and cleaner. As for exposing fields, I'm happy to take that feature. With your permission, I'll add a MARKSTOS@cpan.org account to my repository. Adam K On 12/12/2007, MARKSTOS via RT <bug-Parse-CSV@rt.cpan.org> wrote: Show quoted text
> > > Tue Dec 11 17:01:36 2007: Request 31389 was acted upon. > Transaction: Ticket created by MARKSTOS > Queue: Parse-CSV > Subject: WISH: expose 'fields' method > Broken in: 1.00 > Severity: Wishlist > Owner: Nobody > Requestors: MARKSTOS@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=31389 > > > > When using new( fields => 'auto' ), it can be useful to know which > fields were discovered before a row is fetched. > > (For example: to use the fields to create a table based on the CSV field > names before inserting into it). > > Text::CSV_XS can already do this with the fields() method. That method > just needs to be exposed. > > Alternately, the whole Text::CSV_XS object could be exposed, or used as > a parent class. >
Subject: Re: [rt.cpan.org #31389] WISH: expose 'fields' method
Date: Tue, 11 Dec 2007 23:13:02 -0500
To: bug-Parse-CSV [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Adam Kennedy via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=31389 > > > I found that using Text::CSV_XS as a parent class didn't really work. > > For one, it's XS, so debugging is trickier, and for another I need to store > extra information. > > It turned out that extending by encapsulation was much simpler and cleaner. > > As for exposing fields, I'm happy to take that feature. > > With your permission, I'll add a MARKSTOS@cpan.org account to my repository.
That's fine. I'll need a reminder of the location of it. Mark
This involved some shenanigans and changing the name of one of the constructor params, but done now in 1.99