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


in reply to Re^3: What operator should perl5porters use for safe dereferencing?
in thread What operator should perl5porters use for safe dereferencing?

Um, no, eval prevents dieing, Safe prevents ops you don't allow (in theory) like exit, system, etc
  • Comment on Re^4: What operator should perl5porters use for safe dereferencing?

Replies are listed 'Best First'.
Re^5: What operator should perl5porters use for safe dereferencing?
by thomas895 (Deacon) on May 29, 2012 at 19:56 UTC

    Safe can -- if (ab)used correctly -- prevent your program from dieing as well.

    ~Thomas~
    I believe that the source code to life is written in Perl :-)

      Safe can prevent die from being called, but not dying in general, or even due to "bad" derefs.

      If you wanted to change the behaviour of `->`, especially in a lexical scope, you could use an opcode checker. The autovivification pragma is an example of such.