eval { die 'Ack!'; }; print "ERROR: $@\n"; exit; __END__ #### eval { # Something that can die ... }; Your::CustomMod::launch_error( $@ ) if ( $@ );