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},