On Mon, Aug 13, 2007 at 07:24:56PM +0800, Jeff Pang wrote:
> >> sub exit {
> >> print "test exit";
> >> exit;
> >> }
> >
> >This does not "overwrite" exit. Your own subroutine &exit and the
> >built-in CORE::exit() are not the same thing.
>
> Then how to overwrite CORE::exit?
> Can anybody help explain how Apache::exit overwrite CORE::exit?
$ perl -le 'BEGIN { *CORE::GLOBAL::exit = sub { print 42 } } exit; print 99'
42
99
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/