Re: Package Proposal: Text_TSV

From: Date: Mon, 14 Jul 2003 14:21:14 +0000
Subject: Re: Package Proposal: Text_TSV
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18236@lists.php.net to get a copy of this message
On Monday, Jul 14, 2003, at 05:17 US/Central, Martin Jansen wrote:
On Sun Jul 13, 2003 at 07:5235PM +0200, Tomas V.V.Cox wrote:
I love the well presented class, but I guess that there is already this functionality in PEAR and missing features should be implemented there. At least the points you mention in your page can be easily added. I'm -1.
Agreed. Paul: What do you think about merging string support into File_CSV?
I was hoping I could get away with just the Text_TSV class (as I am lazy and want to do the least work possible ;-), but I agree that it'd be best to merge the code in some fashion. My only argument against doing so with File_CSV as it stands is that the name "File_" implies the class is for file-work, not text-work in general. I'd like to suggest the following:
    (1) Merge the parsing code in File_CSV with the contents
    of Text_TSV to create a Text_CSV class that parses CSV text
    blocks into their component parts.
    (2) Remove the parsing code from File_CSV entirely so that
    it only reads lines from the .csv file, then passes them off
    to Text_CSV for parsing and returns those results.
This way, we get the file-reading functionality of File_CSV as it is now, and we get the string- and array-manipulation functionality of the proposed Text_TSV. Then, if you need to parse string variables and form input directly (not via files), you can. Is that a bad idea, or is it something you think we can work with? -- pmj

« previous php.pear.dev (#18236) next »