Skip Menu |

This queue is for tickets about the HTML-Template-Extension CPAN distribution.

Report information
The Basics
Id: 2945
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: HTML-Template-Extension

People
Owner: info [...] ebruni.it
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.20
Fixed in: (no value)



Subject: HTML::Template::Extension::IF_TERN::_if_tern patch
There is no reason to do 2 passes, or use $& (which slows perl down). sub _if_tern { my $t = shift; $$t =~ s{\%(\S+?)\?(.*?)(\:(.*?))?\%}{ my $replace; $replace = qq~<TMPL_IF NAME="$1">$2~; if (defined $3) { $replace .= qq~<TMPL_ELSE>$4</TMPL_IF>~; } else { $replace .= '</TMPL_IF>'; } $replace; }gmse; return $$t; } You should do this for all your HTML::Template::Extension:: modules (basically all except do_nothing) FYI, I've tested this one, it works
Patch included in version 0.21. All filters in plugins are been updated and optimized