perl html template error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello, I am lerning the html template module and I keep get an error
on this line


HTML::Template->output() : fatal error in loop output :
HTML::Template : Attempt to set nonexistent parameter 'heading' - this
parameter name doesn't match any declarations in the template file :
(die_on_bad_params => 1) at /usr/lib/perl5/site_perl/5.8.0/HTML/ line 2997
 at ./one.cgi line 60

It looks like HEADINGS is not part of html::template any ideas on
which module has setting? or is it obsolete?

Re: perl html template error

Quoted text here. Click to load it

You should give us a clue on how you build the content of @headings
and what your template placeholders look like.

The error suggests that your template might have a loop placeholder of
name HEADING (here you are defining HEADINGS instead) or one of the
field names is declared HEADING and this key might be missing from the
records (hash references) inside @headings.


Re: perl html template error

joe wrote:
Quoted text here. Click to load it


Why do you think there is a default variable of HEADINGS?

You have to defined it in your template.

The error is saying that you have a template variable 'heading',
that you're not setting.  You can either set it to '', or read
the documentation to learn how to use 'die_on_bad_params'.

Re: perl html template error

Thanks, Makes sense. I was going over the tutorial and the template
did not have HEADINGS anywhere.
On Mar 11, 11:09 am, "J. Gleixner" <glex_no-s...@qwest-spam-
no.invalid> wrote:
Quoted text here. Click to load it

Site Timeline