Slash Boxes
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)

  (email not shown publicly)

Working in Truro
Graduate with BSc (Hons) in Computer Systems and Networks
pm :,,
lug : Devon & Cornwall LUG
irc : TeeJay
skype : hashbangperl
livejournal : hashbangperl []
flickr :hashbangperl []

Journal of TeeJay (2309)

Saturday April 12, 2003
01:14 PM

Iterator class in 'quite slow' shoclker

[ #11616 ]
I have been playing around with a nice iterator object (for use in TT templates) and it seems impossible to make more than half the speed of copying an array of arrays into an array hashrefs.

This is using perl 5.6.1 so Object calls in Perl 5.8 may be faster but not much.

Anyway the iterator is very easy to use, and means I can change underlying data structures and the iterator just works.

This means my current web project (a resteraunt and entertainment search engine) uses two patterns - SQL Phrasebook and Iterators. I wonder how many more I can get in.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I have been playing around with a nice iterator object (for use in TT templates)

    If you are only using these iterator objects within TT, take a look at Template::Iterator -- every FOREACH and FOR loop within a template is already implemented using an Iterator (that's the loop special variable). This iterator class is trivially modifiable to work outside of TT, as well, if you want to go that way.