At 12:30 PM 3/26/2003, Arkady Grudzinsky wrote:
thanks for your response. From what I understand, there are ways AROUND,
but there is no DIRECT way to do this using CGI::App.

I don't know how supported this is, but I found this in 3.0: # Send output to browser (unless we're in serious debug mode!) unless ($ENV{CGI_APP_RETURN_ONLY}) { print $output; }

You could use it like so:

$ENV{CGI_APP_RETURN_ONLY} = 1;
my $output = $sub_app->run;
$ENV{CGI_APP_RETURN_ONLY} = 0;
return($output);

This might still have a problem with duplicate headers, though.

Perhaps a "return body only" flag could be added to run() for this purpose, or run() could check for a param() setting to only return the body.

On the other hand, perhaps something like this instead, to prevent the "outer" CGI::Application from printing:
my $output = $sub_app->run;
$ENV{CGI_APP_RETURN_ONLY} = 1;
return;


Having an official "return only" flag would be helpful for when you need to print out your own header and body. The only way to do that now (that I know of) is to print the header and body, and then exit().

--
Greg Marr
[EMAIL PROTECTED]


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to