Re: [htmltmpl] RFC: Objects in templates
Brought to you by:
samtregar
From: Philip T. <phi...@gm...> - 2004-06-02 16:57:06
|
Sometime Today, michael assembled some asciibets to say: > I was wanting to use Class::DBI to Model my data and H::T to View it. > When I do this I end up with a lot of code that looks like this > > $tmpl->param( > ObjAtt1 => $obj->att1, > ObjAtt2 => $obj->att2, > ObjAtt3 => $obj->att3, > ObjAtt4 => $obj->att4, > ObjAtt5 => $obj->att5, > ); Just implement the param() method and include your object in the associate list to new. Simple as that. Philip -- "Art thou a witch, *viva espana*?" -- The Spanish Inquisition (Tadfield version) in action (Terry Pratchett & Neil Gaiman, Good Omens) |