Subject: | render method does not process additional variables |
ERROR 1:
render method in Form.pm (line 66), when called like:
my $content = $input->render('newtask', '/submit_newtask', @myfields,
{title => $title});
processes additional variables with:
# check for form template vars
if ( ref( $fields[@fields] ) eq "HASH" ) {
$form_vars = pop @fields;
}
which is wrong, and should be:
# check for form template vars
if ( ref( $fields[$#fields] ) eq "HASH" ) {
$form_vars = pop @fields;
}
ERROR 2:
Later, in line 115, $form_vars are added as $args->{vars}, but should be
like this:
my $args = {
name => $name,
url => $url,
form => $self->{data},
content => join( "\n", @form_parts ),
};
%$args = (%$args, %$form_vars);