From: Matt S Trout Date: Sat, 11 Aug 2012 17:32:14 +0000 (+0000) Subject: clean up TT override X-Git-Tag: v1.000000~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cfb242ddcdac66bf0fd0fdd2aaec671af3b06061;p=scpubgit%2FHTML-String.git clean up TT override --- diff --git a/lib/HTML/String/TT/Directive.pm b/lib/HTML/String/TT/Directive.pm index 11fa963..b77d501 100644 --- a/lib/HTML/String/TT/Directive.pm +++ b/lib/HTML/String/TT/Directive.pm @@ -2,12 +2,13 @@ package HTML::String::TT::Directive; use strictures 1; use HTML::String::Overload (); +use Data::Munge; use base qw(Template::Directive); sub template { - my $result = Template::Directive::pad(shift->SUPER::template(@_), 2); - $result =~ s/sub {/sub { use HTML::String::Overload;/; - $result; + return byval { + s/sub {/sub { use HTML::String::Overload;/; + } Template::Directive::pad(shift->SUPER::template(@_), 2); } 1;