perl html template error

Discussion in 'Perl Misc' started by joe, Mar 11, 2008.

  1. joe

    joe Guest

    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?
     
    joe, Mar 11, 2008
    #1
    1. Advertising

  2. joe

    Guest

    On Mar 11, 3:24 pm, 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?


    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
     
    , Mar 11, 2008
    #2
    1. Advertising

  3. joe

    J. Gleixner Guest

    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'.
     
    J. Gleixner, Mar 11, 2008
    #3
  4. joe

    joe Guest

    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'.
     
    joe, Mar 13, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Theis
    Replies:
    2
    Views:
    494
    Chris Theis
    Jul 24, 2003
  2. tom_usenet
    Replies:
    0
    Views:
    559
    tom_usenet
    Jul 24, 2003
  3. Replies:
    1
    Views:
    2,139
    Gianni Mariani
    Jun 8, 2007
  4. Peng Yu
    Replies:
    3
    Views:
    801
    Thomas J. Gritzan
    Oct 26, 2008
  5. C. Olive
    Replies:
    1
    Views:
    270
    Chris Smith
    Oct 4, 2003
Loading...

Share This Page