Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > perl html template error

Reply
Thread Tools

perl html template error

 
 
joe
Guest
Posts: n/a
 
      03-11-2008
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?
 
Reply With Quote
 
 
 
 
sheinrich@my-deja.com
Guest
Posts: n/a
 
      03-11-2008
On Mar 11, 3:24 pm, joe <jcha...@gmail.com> wrote:
> 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

 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      03-11-2008
joe wrote:
> 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'.
 
Reply With Quote
 
joe
Guest
Posts: n/a
 
      03-13-2008
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:
> joe wrote:
> > 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'.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
template template arguments: expected a class template, got `Component<T1, T2, T3> gary.bernstein@gmail.com C++ 1 06-08-2007 07:10 AM
Compiler error occurred when try to use a flexible template expression in preprocessor definesCompiler error occurred when try to use a flexible template expression in preprocessor defines snnn C++ 6 03-14-2005 04:09 PM
Classic ASP HTML Templates like Perl's HTML::Template? C. Olive Perl Misc 1 10-04-2003 05:29 PM
Re: A Newbie Question about template template template tom_usenet C++ 0 07-24-2003 12:06 PM
Re: A Newbie Question about template template template Chris Theis C++ 2 07-24-2003 09:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57