1 package HTML::String::TT;
6 if ($INC{"Template.pm"} and !$INC{"UNIVERSAL/ref.pm"}) {
7 warn "Template was loaded before we could load UNIVERSAL::ref"
8 ." - this means you're probably going to get weird errors."
9 ." To avoid this, use HTML::String::TT before loading Template."
11 require UNIVERSAL::ref;
15 use HTML::String::TT::Directive;
24 PARSER => Template::Parser->new(
25 FACTORY => 'HTML::String::TT::Directive'
27 STASH => Template::Stash->new,
28 FILTERS => { no_escape => sub {
29 $_[0]->$_isa('HTML::String::Value')
30 ? HTML::String::Value->new(map $_->[0], @{$_[0]->{parts}})
31 : HTML::String::Value->new($_)
33 (ref($_[0]) eq 'HASH' ? %{$_[0]} : @_)