Just another perl hacker somewhere near Disneyland
Following up on my last post, I think I have the main routines mostly done, with most of the options that I want. One change is that the first argument is now a hashref instead of just a db handle, so you can pass in any sort of argument to the iterator generators.
Also, the argument after any coderef can be another hashref, to override the first hash, or to pass in any other arguments to the coderefs. When I was testing this on Windows, I used the DBI prepare() method because my ODBC driver is broken, and I can not re-use statement handles. On Unix, I replaced it with prepare_cached(), and the runtime on my report went from ~8 minutes to ~4 minutes. So that should probably be another option, if, say, I were to release this on CPAN.
What to name this module, though? I think I'm leaning toward DBIx::Iterator, and I'll probably post the code on PerlMonks first for ideas on what else might be done to it.
Update: I posted it.