On Jul 19, Scott R. Godin said:

I'd LIKE to be able to (I think) inherit from Subscriber::DB somehow for a Subscriber::DB::CSV such that I can take the filtered request and retrieve/output CSV-formatted records from the database..

I've already produced the code to do so in another command-line based script (mysql2csv), thusly:
[snip]

I have a *fair* idea of how I'd modularize this, but I'm still unsure about Subscriber::DB (as per my recent two responses to your post to the list) as to whether I'd have Subscriber::DB::filter() return an $sth, or embed the $sth inside the object and use further methods to loop over the results. (the end result being I'm unsure as of yet how to go on.) :)

The filter() method of Subscriber::DB should act in whatever way is the most natural to you. If it returns a statement handler, that saves you the trouble of building an iterator class, or holding all the results in memory at once. That sounds lazy[1] to me.


[1] as in, Laziness, Impatience, and Hubris, the three virtues of a Perl programmer

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to