sub cgiapp_postrun { my ($app,$outref) = @_; return $outref if $app->get_current_runmode() eq "irregular_run_mode"; # ... }