From: Matt S Trout Date: Sun, 12 Aug 2012 22:01:56 +0000 (-0700) Subject: document rt ticket for overload::constant weirdness X-Git-Tag: v1.000000~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c65e9e110f77d158b790e86d0f5cd585b25da3f;p=scpubgit%2FHTML-String.git document rt ticket for overload::constant weirdness --- diff --git a/lib/HTML/String/TT/Directive.pm b/lib/HTML/String/TT/Directive.pm index 726acfe..770f5fa 100644 --- a/lib/HTML/String/TT/Directive.pm +++ b/lib/HTML/String/TT/Directive.pm @@ -11,11 +11,15 @@ sub template { } Template::Directive::pad(shift->SUPER::template(@_), 2); } +# TT code does &text(), no idea why + sub textblock { my ($self, $text) = @_; return $Template::Directive::OUTPUT.' '.$self->text($text).';'; } +# https://rt.perl.org/rt3/Ticket/Display.html?id=49594 + sub text { my ($class, $text) = @_; for ($text) { diff --git a/xt/tt.t b/xt/tt.t index debdbbd..37e644d 100644 --- a/xt/tt.t +++ b/xt/tt.t @@ -28,6 +28,8 @@ is( 'Hi ', ); +# Check we aren't nailed by https://rt.perl.org/rt3/Ticket/Display.html?id=49594 + is( do_tt('"$bar"'."\n"), '"$bar"'."\n"