Eric Wilhelm wrote: > There's nothing vigilante about writing code that assumes other code > will behave properly. If I were going to put something on CPAN that > messed with __DIE__ hooks, it would only be an audit module.
Oh good. > I will, however, > refuse to say "local $SIG{__DIE__}" inside of every eval just because > "*maybe* *somebody* did *something* wrong *somewhere*." The user has > every right to shoot themselves in the foot however they see fit. Unfortunately your foot is on top of theirs because its 50/50 as to who the user is going to email with the bug. That said, I only bother with this level of bulletproofing in things like Test::Builder and you're glad I do. >> Your CPAN module is >> going to break other CPAN modules and the poor sap using them who >> didn't write any of it is going to have no idea why. > > You're placing the blame in the wrong place. Modules which rely on a > poorly-implemented $SIG{__DIE__} are going to break anyway. I'm just > saying we should all leave the slack in the rope and not walk on > eggshells. If the "poor sap" (though I tend to give Perl programmers > more credit than that) wants to send me an e-mail questioning why I > would be so bold as to use eval, I'll happily diagnose the problem and > send them in the right direction. That's very generous of you.