develooper Front page | perl.perl5.porters | Postings from June 2021

Re: deprecating non-default postderef_qq

Thread Previous | Thread Next
From:
hv
Date:
June 15, 2021 19:57
Subject:
Re: deprecating non-default postderef_qq
Message ID:
202106151923.15FJNsP14658@crypt.org
"Ricardo Signes" <perl.p5p@rjbs.manxome.org> wrote:
>On Tue, Jun 15, 2021, at 1:36 PM, hv@crypt.org <mailto:hv%40crypt.org> wrote:
>> Could you clarify which if any of these will be affected?
>>   "Eat more $pies-"
>>   "Eat more $pies->"
>>   "Eat more $pies->@"
>
>I would not expect any of them to be affected.  Here's perl without
>postderef_qq:
>~$ perl -Mfeature=say -e '$pies = [1,2,3]; say "$pies-"'
>ARRAY(0x7fd16980ac48)-
>~$ perl -Mfeature=say -e '$pies = [1,2,3]; say "$pies->"'
>ARRAY(0x7ffc1500ac48)->
>~$ perl -Mfeature=say -e '$pies = [1,2,3]; say "$pies->@"'
>ARRAY(0x7fbcce80ac48)->@
>~$ perl -Mfeature=say -e '$pies = [1,2,3]; say "$pies->@*"'
>ARRAY(0x7fecc100ac48)->@*
>
>and here's the sequence with postderef_qq:
>
>~$ perl -E '$pies = [1,2,3]; say "$pies-"'
>ARRAY(0x7fda0e00ac48)-
>~$ perl -E '$pies = [1,2,3]; say "$pies->"'
>ARRAY(0x7fee2700ac48)->
>~$ perl -E '$pies = [1,2,3]; say "$pies->@"'
>ARRAY(0x7f903600ac48)->@
>~$ perl -E '$pies = [1,2,3]; say "$pies->@*"'
>1 2 3
>
>Only the case ->@* is going to change, so only it should warn.

Super, thanks for the clarification.

Hugo

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