On Mon, 02 Nov 2009, Ben Morrow wrote: > Is there any point going over all this again? Removing 'err' was > considered to be a Rule 1 decision, so unless that changes we're not > doing anything but stirring up old muck. The decision was not just to remove "err", but also to add "andthen" and "orelse" with slightly different semantics. Rafael wrote: | Larry decided to rename err to orelse in Perl 6. (with a few changes, | irrelevant to Perl 5, see the perl6-language mailing list.) Also, a | new operator andthen has been added. See synopsis 3. | | That makes err obsolete. So, I'll remove it from Perl 5.10. | | orelse and andthen can wait a further release to be added (as a | feature in the sense of feature.pm) to Perl 5. http://www.nntp.perl.org/group/perl.perl5.porters/2007/09/msg128324.html So we could revive "dor" as "orelse". The question is, would we also have to implement the assignment to $! as well? | test1() orelse test2() orelse test3() ... | | Returns the first argument that evaluates successfully (that is, | if the result is defined). Otherwise returns the result of the | right argument. | | If the right side is a block or pointy block, the result of the left | side is bound to any arguments of the block. If the right side is | not a block, a block scope is assumed around the right side, and the | result of the left side is implicitly bound to C<$!> for the scope | of the right side. http://svn.pugscode.org/pugs/docs/Perl6/Spec/S03-operators.pod I have to admit that I don't actually understand the spec though: the right side would only be evaluated when the left side is undef, so wouldn't $! always be set to undef (and therefore 0)? Cheers, -JanThread Previous | Thread Next