> _Hash # -> _Hash.new(a => 'A')
> _List
> _Text
Or - what if there was an "accumulator" that could be used for generic access
to anything that the TT engine wants to supply and not let the templates
override.
For that I'd propose '_'.
_.Hash # > _.Hash.new.
Or maybe having the . isn't necessary - actually I'd prefer for it not to be
there.
So I'd still like _ to be there, just more general purpose - as in:
my $t = Template3->new(virtual_objects => {
Hash => \&MyHashInstantiator,
MyType => 'MyPackageFoo',
});
and in the templates
[% foo | _Hash.somecoolthing %]
[% _MyType.new.do_something() %]
This feels more general to me. It should still be unambiguous with the '_'
operator - but I'd almost argue that the '_' concatenation operator should go
and just leave '~' for concatenation.
Paul
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates