I call the template processing form within a object like
______________________________________________________________

sub show_template {
   $self = shift;

   $self->{'fortytwo'} = 42;
   $self->{'me'} = $self;
   my $val = $self;
   $template->process($self->{'templatefile'}, $val) or die;
}

sub mymethod {
   return 'hi';
}
______________________________________________________________

Meanwhile, in the template
   [% fortytwo %]  evaluates to 42, as expected.
However,
   [% mymethod %] fails. But
   [% me.mymethod %] yields 'hi'.

but I feel I should not need to qualify the method with the 'me' trick, I
never see it in examples. So how should I set things up to be able to
directly call the methods of the object that is passed as the value
parameter to process()?

TIA

~henq





_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to