Subject: | Single-argument, hashref version of param() is not supported. |
HTML::Template's param() method can be called with a single argument
which is a hash reference. HTML::Template::Set does not understand this
way of calling HTML::Template::param() and breaks things -- converting a
hash ref into a lower-case string 'hash(0x234523)' which is of course an
invalid parameter name.
The fix is below.
- Dmitri.
--- cut ---
@@ -409,6 +409,13 @@
sub param {
my ($self, @args) = @_;
+ # This converts from a single-argument, hashref version of the APIs
+ # to the more common form.
+ if (1 == @args && 'HASH' eq ref($args[0])) {
+ my $hash = shift @args;
+ @args = %$hash;
+ }
+
if (@args == 1) {
return $self->_get_translated_set_tag($args[0]);
} else {
--- cut ---