Hey list!
I'm having a problem with overriding a sub in CORE::GLOBAL.
I need to override exit(), and I'm doing that with:
BEGIN { *CORE::GLOBAL::exit = sub { print "exit: ".shift; } };
..which works for the program itself.
However! When I call exit() in a module used by my program, the module
actaully calls 'exit()' in its original meaning, and NOT the one I defined
myself.
How do I get the module to treat exit() the way I defined it?
I don't wanna change code in the module itself.
Thanks in advance!
--
Jesper Nøhr - decius <jesper@noehr.org>
Holstebro, Denmark -- http://printf.dk
UNIX Administrator, Software Engineer, Geek.
Thread Next