develooper Front page | perl.perl5.porters | Postings from August 2009

Re: [perl #68828] Deparse deparses // as err

Thread Previous | Thread Next
From:
Frank Wiegand
Date:
August 28, 2009 01:00
Subject:
Re: [perl #68828] Deparse deparses // as err
Message ID:
1251446397.14474.257.camel@hal2
Hi,

Am Freitag, den 28.08.2009, 00:46 -0700 schrieb David Landgren via RT:
> > $ bleadperl -MO=Deparse -e 'undef // undef'
> > undef err undef;
> > -e syntax OK
> > 
> > $ bleadperl -MO=Deparse -e 'undef err undef'
> > Can't modify constant item in undef operator at -e line 1, next token
> > ???
> > syntax error at -e line 1, next token ???
> > -e had compilation errors.
> > ;
> > 
> > As far as I can remember, there is actually no 'err' operator.
> 
> There is.
> 
> C<err> is to C<//> as C<and> is to C<&&> and C<or> is to C<||>.
> 
> This was introduced in 5.10

Sorry, but I think this is wrong.

First, the code Deparse.pm produces does not compile. So it's a bug in
Deparse.pm which should be fixed.

I found this mail from Rafael:

        From: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
        Date: 2007/9/6
        Subject: [RULE ONE] Re: down with err, up with dor
        To: perl5-porters@perl.org

        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.
        
And this commit: http://perl5.git.perl.org/perl.git/commitdiff/f23102e2d635682f5818275abd91b9deefde470e


Bye, Frank


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About