On Tue, 23 Dec 2003 13:07:38 -0800, David Zhuo <[EMAIL PROTECTED]> wrote:
Jesper,
next time when you reply, please remember to reply or CC: the group
Of course, sorry.
On Tuesday 23 December 2003 12:17, Jesper Noehr wrote:
Hey David.
Thanks for your reply.
It seems you're overriding the sub within a package. Is that necesarry?
no. it isn't. i put it in the package just for demo.
Can't you just do it in the top of the program, using the module?
yes.
You can see my code here:
http://cvs.sunsite.dk/viewcvs.cgi/phemail/contrib/yadda/yadda?rev=1.6&conte
nt-type=text/vnd.viewcvs-markup
Basicly, I use the module Mail::Audit that does exit(); instead of
return();, so I cannot catch the exit-code.
I redeclare exit() to die() instead, so I can read the exit-code.
i have never used Mail::Audit so i am not familiar with it. looking at
your
code, i am almost certain that this:
CORE::exit;
I am using CORE::exit because I _need_ the actual exit in my own program.
Mail::Audit does not call CORE::exit, it just calls exit();
is your problem. CORE::exit refers to the built-in exit function which
halts
execution of your problem. since you have already overridden the built-in
exit, there is no need for that. you simply need to:
exit;
which calls your defined sub.
The problem is, that any calls within Mail::Audit to exit(); are treated
as the REAL exit, and not the one I defined.
again, because i am not familiar with Mail::Audit i can't say for sure
what
Mail::Audit is doing but your CORE::exit is certainly problematic.
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>