Re: Package Proposal: Text_TSV

From: Date: Mon, 14 Jul 2003 14:26:48 +0000
Subject: Re: Package Proposal: Text_TSV
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18237@lists.php.net to get a copy of this message
On Monday, July 14, 2003, at 10:21 AM, Paul M Jones wrote:
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.
so besides fopen()/fgets()/fclose(), what would File_CSV natively do? I'm -1 for creating a useless shell of File_CSV, and -1 for moving without making it a shell, for bc reasons. Not sure if that adds up to -2 or not. George

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