TT's new takes a hashref or a hash
[scpubgit/HTML-String.git] / lib / HTML / String / TT.pm
CommitLineData
ed99cbb4 1package HTML::String::TT;
2
3use strictures 1;
4use Template;
5use Template::Parser;
6use Template::Stash;
7use HTML::String::TT::Directive;
8
9sub new {
10 shift;
11 Template->new(
12 PARSER => Template::Parser->new(
13 FACTORY => 'HTML::String::TT::Directive'
14 ),
15 STASH => Template::Stash->new,
77724961 16 (ref($_[0]) eq 'HASH' ? %{$_[0]} : @_)
ed99cbb4 17 );
18}
19
201;