Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: Templating algorithm - pass in variables vs callback?by lachoy (Parson) |
on Mar 01, 2005 at 02:36 UTC ( [id://435264]=note: print w/replies, xml ) | Need Help?? |
No, that's not what I'm talking about. Systems like Template Toolkit allow you to pass an object to a template as the value of one of the hash keys you pass in. You can then call methods on the object from the template and they're called just like normal method. For instance, given the dummy class:
And the following template code:
You'll see:
Chris
In Section
Seekers of Perl Wisdom
|
|