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

Re: removing the old-style package separator

Thread Previous | Thread Next
Paul "LeoNerd" Evans
August 15, 2021 12:19
Re: removing the old-style package separator
Message ID:
On Sun, 15 Aug 2021 13:02:58 +0200
Leon Timmermans <> wrote:

> As far as I can tell, all the pain relates to quoted strings. I would
> argue we should remove them only there, that would have all the
> benefits without actually breaking anything.

Yes and no.

The trouble with doing that is it would increase the difference in
quoting rules between qq()ed strings and elsewhere.

On Libera/#perl yesterday we encountered a new one that nobody seemed
to be previously aware of:

eval: my $x = "scalar"; my @x = ("array"); [ $x[0], ${x}[0], "$x[0]", "${x}[0]" ]

      [ 'array', 'array', 'array', 'scalar[0]' ]

Notice how the braces of `${var}[0]` act differently inside qq()ed
strings as compared without.

I'm not sure I'd like making ' act in a similarly inconsistent way
between these two places.

Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About