http://www.perlmonks.org?node_id=596658


in reply to Re^3: Use of "die" in OO modules
in thread Use of "die" in OO modules

Well, I guess it's a matter of defining what we mean. My definition would be that when code does something exceptional i.e. contrary to the "normal" flow or producing an unwanted error condition, the interpreter will interrupt program flow by propagating an object that encapsulates the error information, up through the stack until it finds code ready to handle it. The key here is that while die within an eval{} sets $@, that is an error variable, but it is not really much of an object (at least, not in the sense that it's commonly used and understood by practitioners of Object-Oriented paradigm). I'm aware that there are CPAN modules that implement Exception classes, but the fact is they're not integrated into the language at the deepest levels. (Whether that's a good thing or bad is, well, opinion I guess.)

[Jon]