> The changed code is as below:
> sub main {
> .....
I'm assuming main is the run_mode being called. If not, you'll need to
show us more code.
> showgraph();
>
> print $q->end_html();
This looks to be the problem. you should not be printing anything. Think
of CGI::App as doing something like:
my $q = new CGI:
my $text = Your::Module::Runmode();
print $q->header() unless $module_set_header_props;
print $text;
Thus, YOUR module shouldn't print ANYTHING. You should stick anything you
would normally print into a scalar and return it (or a reference to it).
In your code showgraph() returns a value, which main then ignores, and
main() prints some html.
Main should be like:
main {
my $self= shift;
my $q = $self->query();
.....
my $text = showgraph();
$text .= $q->end_html();
return \$text;
}
Again, assuming main() is your run_mode.
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]