in reply to Re^3: Perl 5.12.0 has been released!
in thread Perl 5.12.0 has been released!

Seems to me that this is more useful:

BEGIN{ *CORE::GLOBAL::die = sub{ CORE::die( $_[0] //'Unimplemeted' ); +} }

A bare die (same number of characters), will be converted to Unimplemented at ....

And it can also be used a sub-statement like open O, '<', 'fred' or die;

I guess it doesn't have the cache' of ...?


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.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^5: Perl 5.12.0 has been released!
by ambrus (Abbot) on Apr 14, 2010 at 09:43 UTC

    A bare die rethrows a caught exception (from $@) so it can't be reused for this without breaking compatibility.

      At the expense of one more character you could use:

      c:\test>perl -wle"sub TODO{ die 'Unimplemented' } 0 or TODO;" Unimplemented at -e line 1.

      with the same benefits. Or perhaps one of these:

      c:\test>perl -wle"sub _'_'_{ die 'Unimplemented' } 0 or _'_'_;" Unimplemented at -e line 1. c:\test>perl -wle"sub ___{ die 'Unimplemented' } 0 or ___;" Unimplemented at -e line 1.

      I quite like that last one. And it has the added benefit of not requiring the use of a dog slow "real parser" to not confuse my syntax highlighter!

      But perhaps it is more about the changes that allowed yadayada to be implemented, than yadayada itself.


      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.