Iterator::Lite

TeeJay on 2003-04-28T15:55:32

In the absence of an iterator like mine on CPAN - I checked the other day (although there are about 5 already, none do it my way).

Features of my iterator are being able to add arbitary columns and values (but not rows/elements) after construction and fetching, restarting and (soon) getting the output in HTML::Template array of hashes format.

I will probably do some more work on the phrasebook class to go with it. The phrasebook has some nice features, like specifying field ordering in the xml so that sql field names and ordering can be changed without affecting the perl code. It also integrates dbi stuff and fetches queries for you in different ways.

The two modules combined are pretty powerful and the basis, along with TT, for my super sekrit project ( to launch in may)


Re: Iterator::Lite

richardc on 2003-04-28T16:38:11

In the absence of an iterator like mine on CPAN - I checked the other day (although there are about 5 already, none do it my way).
So what is your, way, and what makes it so special that it needs it's own toplevel namespace?

Care to put the pod online?

Re: Iterator::Lite

TeeJay on 2003-04-28T16:49:10

So what is the best namespace to put iterators into ?

Seriously - I looked at CPAN for an obvious namespace to drop it into - maybe I should use class::iterator::lite but it isn't a class you really use as a superclass, more a class you use as visitor ( has-a rather than is-a ).

I will put the pod and source online once I have tested it a bit more and made sure it isn't unintentionally copying from damien or anyone else.

Re: Iterator::Lite

richardc on 2003-04-28T17:03:36

So what is the best namespace to put iterators into ?


Well to me it mostly depends on your API, which is why I'm curious to see what your module actually does, and how you call on it. That's why I asked about seeing the pod.

Seriously - I looked at CPAN for an obvious namespace to drop it into - maybe I should use class::iterator::lite but it isn't a class you really use as a superclass, more a class you use as visitor ( has-a rather than is-a ).


For which Class::Visitor could be a good name, if it weren't taken already, maybe something in the Data:: heirarchy.

Re: Iterator::Lite

TeeJay on 2003-04-29T11:59:37

er.. yeah, I would need to write some pod.

At the moment I need to debug a small problem with the autoload created subs, so that it works properly.

Data::Iterator would be a good name if it is free.