in reply to Portably unit testing scripts
Could you stash the actual CORE::exit coderef somewhere and try overriding CORE::GLOBAL::exit? Or simply import an exit sub into the module's namespace, which will override exit in that namespace only. (You may need to establish this import before loading the module; I am uncertain about this.)
To test pod2usage in that, you will probably need to place your own exit mock at Pod::Usage::exit, and it should probably use a non-local exit, such as die or last, instead of returning normally.
|
|---|