in reply to Re: Why isn't a fatal error trappable?
in thread Why isn't a fatal error trappable?

And that, I've always assumed, is because it is detected at compile time rather than runtime.
So, eval your eval!
$ perl -E 'eval {eval qq{chop "fred"}}; say "Hi"' Hi $

Replies are listed 'Best First'.
Re^3: Why isn't a fatal error trappable?
by BrowserUk (Patriarch) on Nov 16, 2010 at 13:15 UTC

    Well yeah, but there's little point in deferring the inevitable. It's always going to fail, so why work so hard to make it happen at runtime?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Well, the suggestion you raised was that fatal errors weren't trappable if they happened at compile time. The only point I'm making is that you can actually trap them - by delaying the compile time.