BEGIN { *CORE::GLOBAL::exit = sub { goto EXIT }; } while (CGI::Fast->new()) { eval { that_cgi_script(); }; die $@ if $@ ne q{}; EXIT: $CGI::Fast::Ext_Request->Finish(); }