On Tue, 23 Dec 2003 13:28:38 -0800, david <[EMAIL PROTECTED]> wrote:

let me try one more time:

1. Mail::Audit calls exit which should call your defined sub but it doesn't
2. after catching the exit call from Mail::Audit, you will
CORE::exit so your script can exit. correct?
Yes. That is correct. I want all exit-calls in Mail::Audit to be handled by my own sub, and then I want my own program to CORE::exit;

if so, give Mail::Audit a chance to see the "new" exit built-in after you override it:

BEGIN{ *CORE::GLOBAL::exit = sub { print "EXIT: " . shift } }

use Mail::Audit;

or:

BEGIN{
        *CORE::GLOBAL::exit = sub { print "EXIT: " . shift };

require Mail::Audit;

        Mail::Audit->import();
}

I tried both, but it doesn't make any difference. All calls to exit() in Mail::Audit are treated as CORE::exit.
if i have misunderstood you again, please let me know.

david



-- Jesper Nøhr - decius <[EMAIL PROTECTED]> Holstebro, Denmark -- http://printf.dk UNIX Administrator, Software Engineer, Geek.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to