[Jifty-commit] r6059 - Template-Declare/lib/Template/Declare
Jifty commits
jifty-commit at lists.jifty.org
Mon Dec 1 23:21:36 EST 2008
Author: ruz
Date: Mon Dec 1 23:21:36 2008
New Revision: 6059
Modified:
Template-Declare/lib/Template/Declare/Tags.pm
Log:
* stringify in _postprocess, if $val is an object with "" overloaded then
$val =~ s///; do nothing but calls stringification all the time
Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/lib/Template/Declare/Tags.pm Mon Dec 1 23:21:36 2008
@@ -834,6 +834,10 @@
my $val = shift;
my $skip_postprocess = shift;
+ return $val unless defined $val;
+
+ # stringify in case $val is object with overloaded ""
+ $val = "$val";
if ( ! $SKIP_XML_ESCAPING ) {
no warnings 'uninitialized';
$val =~ s/&/&/g;
@@ -845,7 +849,7 @@
$val =~ s/'/'/g;
}
$val = Template::Declare->postprocessor->($val)
- if defined($val) && !$skip_postprocess;
+ unless $skip_postprocess;
return $val;
}
More information about the Jifty-commit
mailing list