[Templates] register vmethods?
Marc Chantreux
marc.chantreux at biblibre.com
Mon Jul 28 23:13:03 BST 2008
hello Sean,
I'm afraid it does the same ...
On Mon, Jul 28, 2008 at 11:26:05AM -0700, Sean McAfee wrote:
> sub Foo::field { $_[1] }
> $Template::Stash::HASH_OPS->{foo} = sub { shift->field(@_) };
> Template->new->process(\"[% x.foo(42) %]", { x => bless({ }, 'Foo' });
--
Marc Chantreux
BibLibre, expert en logiciels libres pour l'info-doc
http://biblibre.com
More information about the templates
mailing list