Jonas Liljegren <[EMAIL PROTECTED]> writes:
> Would there be an intrest of a patch for using print, if availible, in
> the construction of the compiled template if the returned value from
> the stash get() is an object?
>
> For homogenity I would rather have the print method called than
> inserting strings like My::Class=HASH(0x8aeae50)
This is a followup from my earlier request. I have a nice solution
for this problem.
Let's say we have a function or method that returns somthing that
could be used as an object or just inserted in the template:
[% my.thing(here) %]
The only thing I had to do was to overload the string conversion
operator in each class those objects could appear in the template:
use overload '""' => sub { $_[0]->to_string() };
I love Perl! =)
--
/ Jonas - http://jonas.liljegren.org/myself/en/index.html