develooper Front page | perl.perl5.porters | Postings from November 2017

Re: [perl #119823] LABEL<newline>: only works in string eval

November 27, 2017 13:37
Re: [perl #119823] LABEL<newline>: only works in string eval
Message ID:
Brian Fraser wrote:
>Ideally we should be using PEEKSPACE() there, but that calls
>lex_read_space, which swallows up # and anything following it, and that
>would break s#foo#bar#.

It's not as simple as breaking that, and actually that worry is easily
dealt with because we can see before doing the whitespace skipping that
the word is "s" which isn't eligible to become a label.  In fact, we
can see from how well "=>" on a following line works that it should be
possible to detect ":" on a following line, by postponing the recognition
until we know it's OK to process whitespace normally.

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