Good localtime() to you,
I'm in the midst of taking my first foray into the world of C::A
programming. And so far, it has been going well :) I am however having a
problem using cgiapp_postrun() in my application, and I don't understand
why.
I have a small skeleton of an application (to make sure I know what I am
doing) that displays a small page that shows that each run mode works
correctly. I expanded this to display each page with custom header and
footer info. I ended up with a cgiapp_postrun() that looks like the
following:
sub cgiapp_postrun
{
my $self = shift;
my $html_ref = shift;
# Create a new instance of the page template
my $tmpl_frame = $self->load_tmpl($config{TMPL_FRAME});
# Dereference the output data
my $html = $$html_ref;
# Wrap the standard look-and-feel around the output
$tmpl_frame->param(
TITLE => "$config{NAME_COUNTY}, $config{NAME_STATE}
$config{APPLICATION}",
CONTENT => $html,
EMAIL => $config{EMAIL},
UPDATED => $config{UPDATED},
);
# Generate the new page
$html = $tmpl_frame->output();
# Replace old page with the new one
$html_ref = \$html;
}
This function represents one of my runmodes:
sub parcel_view
{
my $self = shift;
my $request = $self->query;
my $page;
$page .= $request->start_html();
$page .= "Parcel view<br>";
$page .= $request->end_html;
return $page;
}
The app runs fine, but it doesn't display the contents of my template, just
the output of my runmode (in this example, a blank page that reads "Parcel
view"). I threw some code in cgiapp_postrun() to write the contents of
$tmpl_frame->output() to a file, and it indeed creates the page I want it
to, but it never reaches the browser.
Any suggestions as to what I may have missed? Thanks in advance, I
appreciate the help!
--------------------------------------------------
Jason A. Crome
Senior Software Engineer, DEVNET, Inc.
E-Mail: crome@xxxxxxxxxxxxx
http://www.devnetinc.com
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|