Re: [Templates] Overriding the default iterator

[prev] [thread] [next] [Date index for 2004/09/03]

From: Andy Wardley
Subject: Re: [Templates] Overriding the default iterator
Date: 06:53 on 03 Sep 2004
Buddy Burden wrote:
> Now, in the badger book, in the section on Template::Iterator, I can see 
> how to create a class to do what I want.  Seems pretty basic.  What I'm 
> wondering is is there any (reasonably simple) way to install this 
> functionality so that I can get it for every loop?  

Yep, set the $Template::Config::ITERATOR package variable to contain the 
name of your iterator module.

e.g.

  use Template::Config;
  $Template::Config::ITERATOR = 'My::New::Iterator::Class';

HTH
A




_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Overriding the default iterator
Buddy Burden 01:43 on 03 Sep 2004

Re: [Templates] Overriding the default iterator
Adam Kennedy 05:31 on 03 Sep 2004

Re: [Templates] Overriding the default iterator
Andy Wardley 06:53 on 03 Sep 2004

Re: [Templates] Overriding the default iterator
Buddy Burden 16:36 on 03 Sep 2004

RE: [Templates] Overriding the default iterator
Thomas, Mark - BLS CTR 17:06 on 03 Sep 2004

Re: [Templates] Overriding the default iterator
Buddy Burden 17:38 on 03 Sep 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52