Dave Howorth wrote:
> In Template Toolkit, any hash key starting with an underscore is hidden 
> from the template. Is there any way to turn this off?

No, not really.

Your best bet would be to replace the 'item' hash virtual method
with one which honours underscore keys.

  my $tt = Template->new();
  $tt->context->define_vmethod( hash => item => sub { $_[0]->{$_[1]} } );

Then you can do this:
  [% hash.item('_') %]

Normally hash.item returns nothing if you try and access it with a key
with a leading underscore.

HTH
A


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

Reply via email to