TT's new takes a hashref or a hash
[scpubgit/HTML-String.git] / lib / HTML / String / TT.pm
index fb1f1cb..90b1ec5 100644 (file)
@@ -13,7 +13,7 @@ sub new {
             FACTORY => 'HTML::String::TT::Directive'
         ),
         STASH => Template::Stash->new,
-        @_
+        (ref($_[0]) eq 'HASH' ? %{$_[0]} : @_)
     );
 }