in reply to catch errors within C
The difference is that just telling it to use a die handler will set that handler after it is finished compiling when it hits that statement at run time. But putting that in a BEGIN block causes the handler to be set at compile time. (However you'd better hope that MY::die_handler has been compiled when you do that or else it won't be guaranteed to work properly. Ain't bootstrapping fun?)
|
|---|