Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TeeJay (2309)

TeeJay
  (email not shown publicly)
http://www.aarontrevena.co.uk/

Working in Truro
Graduate with BSc (Hons) in Computer Systems and Networks
pm : london.pm, bath.pm, devoncornwall.pm
lug : Devon & Cornwall LUG
CPAN : TEEJAY [cpan.org]
irc : TeeJay
skype : hashbangperl
livejournal : hashbangperl [livejournal.com]
flickr :hashbangperl [flickr.com]

Journal of TeeJay (2309)

Monday April 28, 2003
10:55 AM

Iterator::Lite

[ #11887 ]
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)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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?

    • 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.

      --

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;
      • 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 i

        • 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.

          --

          @JAPH = qw(Hacker Perl Another Just);
          print reverse @JAPH;