#!/usr/bin/perl use strict; use warnings; use ModPerl::Util; use ModPerl::Const -compile => 'EXIT'; eval { my $r; $r->status(0); ModPerl::Util::exit(0); }; warn "Oops, there seems to be an error\n"; exit if $@ && ref $@ == ModPerl::EXIT; warn "Still Running\n";