[CDBI] Re: Fast fetch-on-demand iterator complete

"Edward J. Sabol" <sabol-2oVx0MVsMgiP/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Michael Schwern wrote:
> I've completed work on the fetch-on-demand iterator. You can get the patch
> here: http://rt.cpan.org/Ticket/Display.html?id=24959

I like the overall implementation very much. Very unobtrusive. The
refactoring and ->iterator_class(...) class method is very much in the spirit
of Class::DBI. I do have a few nits to pick, however:

I suggest wrapping all pod lines to less than 80 columns and removing any
hard tabs in pod, such as in the following line:

"Class::DBI ships with several iterator classes.	 See L<SEE ALSO> here in this document for a list.	Others may be found on CPAN."

Style nits: "unless( ... )" should be "unless (...)" and "if( ... )" should be
"if (...)" to adhere to (presumably Tony's at this point) overall Class::DBI
programming style.

> It requires an Ima::DBI patch to allow finer control of the statement
> handle cache. http://rt.cpan.org/Ticket/Display.html?id=25073

This is long overdue and *much* needed. If we could get Perrin's
mod_perl-related patch integrated too, we'd have a damn fine Ima::DBI release
here.

> There are now three iterators.
> * PreFetch - The old CDBI::Iterator which fetches everything up front
> * OnDemand - The new fetch-on-demand CDBI::Iterator
> * OnDemand::Opportunistic - More on this below

Naming nits: I don't feel strongly about it, but I think "PreFetch" should be
"Prefetch". "PreFetch" just looks a little weird to me. And
"OnDemand::Opportunistic" seems overly long. Maybe just "Hybrid" instead?

Later,
Ed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.