Skip Menu |

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

Report information
The Basics
Id: 14037
Status: resolved
Priority: 0/
Queue: HTML-Template

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

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



Subject: be friendly to sub-classes by not hardcoding package name
HTML::Template hardcodes it's package name in one place which makes trouble for some sub classing operations. Here's a patch. --- /usr/local/lib/perl5/site_perl/5.8.0/HTML/Template.pm Fri Jun 18 12:42:06 2004 +++ Template.pm Sat Aug 6 16:02:15 2005 @@ -2107,8 +2107,9 @@ # param_map. This means that only the enclosing template # does _parse() - sub-templates get their parse_stack and # param_map fed to them already filled in. + my $pkg = ref $self; $loop->[HTML::Template::LOOP::TEMPLATE_HASH]{$starts_at} - = HTML::Template->_new_from_loop( + = $pkg->_new_from_loop( parse_stack => $parse_stack, param_map => $param_map, debug => $options->{debug},
From: markstos [...] cpan.org
Here's another case where a sub-classer ran into this and provided a solution, although a slightly different one: http://sourceforge.net/mailarchive/message.php?msg_id=11086140
Fixed for 2.8.