[Templates] Anything outstanding for 2.15?

Andy Wardley abw@wardley.org
Thu, 25 May 2006 12:51:04 +0100


Josh Rosenbaum wrote:
> I believe this documentation needs to be removed from the DBI.pm 
> plugin/docs now, correct?
> -------------------
> IMPORTANT NOTE: the XS Stash (Template::Stash::XS) does not currently 
> support access to tied hashes.....
> -------------------

Yes, although the DBI plugin will no longer be part of the core from 
2.15 onwards.  It'll be in a separate Template-DBI distribution.  For 
now this will just contain the DBI plugin unless anyone else has a DBI 
related plugin, provider or other code they want to contribute.

> In Plugins/Table.pm (cvs line 220):
> ------------------------
> if ($item =~ /^data|size|nrows|ncols|overlap|pad$/) {
> 
> My guess is that this should be:
> if ($item =~ /^(?:data|size|nrows|ncols|overlap|pad)$/) {
> ------------------------

Fixed, thanks.

> For previous "pending" patches I'd still like to see the check for 
> backrefs when doing search and replace as noted in our previous thread. 

Done.  Like so:

         if ($replace =~ /\$\d+/) {
             # the slow way with backrefs
         }
         else {
             # the fast way without backrefs
         }
         return $text;

I opted for a simple \$\d+ regex to look for backrefs in the replacement 
  string.  Although it's not totally thorough in that it could 
inadvertently match against "\\$2", it'll still work correctly, albeit 
slower.  I figured that was an acceptable trade-off for simplicity of 
code given that it's an uncommon edge case.

> There was also a CHOMP patch being discussed I believe too.

That's done too.

Cheers
A