sub irregular_run_mode { my $app = shift; $app->header_type("none"); $| = 1; print $app->query()->header(); # code here return ""; } #### sub cgiapp_postrun { my ($app,$outref) = @_; return $outref if $app->get_current_runmode() eq "irregular_run_mode"; # ... }