I'm in the process of using my second template (ever), and I've run into a problem. It might be perl-related, or it could turn out to be just an HTML problem. I've stared at the script and template until I'm cross-eyed, and I just can't find the problem. You can see the script execute here.

The problem occurs in the textarea box below the Title. There's nothing there. What I'm expecting to see is this:

Title: Test Node #1 It might someday have something about perl or slashdot or [http://www. +thespark.com] or [http://www.ttuhsc.edu|ttuhsc] or anything I want.
If you view source, it's there. But it's not being displayed in the form.

The script looks like this:

#!/usr/bin/perl -w use strict; use CGI qw/:all/; use exitwound::AccessData qw(&accessData); use HTML::Template; $|++; # disable buffering my $q = new CGI; my $NodeID = $q->param( "NodeID" ); my $ActionName = $q->param( "ActionName" ); my $NodeTitle = $q->param( "NodeTitle" ); my $NodeDate = $q->param( "NodeDate" ); my $NodeSection= $q->param( "NodeSection" ); my $NodeAuthor = $q->param( "NodeAuthor" ); my $NodeContent= $q->param( "NodeContent" ); if (($NodeID) and ($ActionName eq "Modify")) { $ActionName = "Update"; } elsif ($NodeID) { $ActionName = "Modify"; } else { $ActionName = "Insert"; $NodeID = "Unspecified"; } my @DisplayContent; ($NodeID, $NodeTitle, $NodeDate, $NodeSection, $NodeAuthor, $NodeConte +nt, @DisplayContent) = accessData($NodeID, $NodeTitle, $NodeDate, $NodeSection, $NodeAu +thor, $ActionName, $NodeContent); my $template = HTML::Template->new(filename => 'templates/mod-node.tmp +l'); $template->param(NodeSection => $NodeSection, NodeTitle => $NodeTitle, NodeAuthor => $NodeAuthor, NodeDate => $NodeDate, NodeContent => $NodeContent, ActionName => $ActionName, DisplayContent => @DisplayContent, ); print $template->output;
The template is in my scratch pad. (For some reason, it would not display properly here.)

Any advice or insight as to why nothing is being displayed in the textarea box would be greatly appreciated.

Thanks.

If things get any worse, I'll have to ask you to stop helping me.


In reply to HTML::Template Problem by shockme

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.