perl html template error

J

joe

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

$template->param(HEADINGS=>\@headings);


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/
Template.pm 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?
 
S

sheinrich

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

$template->param(HEADINGS=>\@headings);

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/
Template.pm 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?

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.

steffen
 
J

J. Gleixner

joe said:
Hello, I am lerning the html template module and I keep get an error
on this line

$template->param(HEADINGS=>\@headings);


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/
Template.pm 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?

HTML::Template

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'.
 
J

joe

Thanks, Makes sense. I was going over the tutorial and the template
did not have HEADINGS anywhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top