You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ perl -e 'print "a\U="'
Can't modify constant item in concatenation (.) or string at -e line 1, near "print "a\U=""
Execution of -e aborted due to compilation errors.
The "a\U=" string constant ought to generate ops corresponding roughly to
"a".uc("=") (which would then be constant-folded). However, the "=" is
being interpreted by the tokeniser as part of the concatenation operator,
producing ops corresponding to "a".=uc("") (which generates the error).
This happens because the implicit concatenation operator is generated
in toke.c via the Aop() macro, which allows an addition-type operator
to be mutated into an assignment operator if it is immediately followed
by an "=". It should instead be generated via one of the other macros,
or possibly a new macro, that doesn't allow for mutation to an assignment
operator. There are multiple sites in toke.c making the same mistake.
Activity
p5pRT commentedon Dec 7, 2010
From zefram@fysh.org
Created by zefram@fysh.org
$ perl -e 'print "a\U="'
Can't modify constant item in concatenation (.) or string at -e line 1, near "print "a\U=""
Execution of -e aborted due to compilation errors.
The "a\U=" string constant ought to generate ops corresponding roughly to
"a".uc("=") (which would then be constant-folded). However, the "=" is
being interpreted by the tokeniser as part of the concatenation operator,
producing ops corresponding to "a".=uc("") (which generates the error).
This happens because the implicit concatenation operator is generated
in toke.c via the Aop() macro, which allows an addition-type operator
to be mutated into an assignment operator if it is immediately followed
by an "=". It should instead be generated via one of the other macros,
or possibly a new macro, that doesn't allow for mutation to an assignment
operator. There are multiple sites in toke.c making the same mistake.
Perl Info
p5pRT commentedon Aug 25, 2014
From @cpansprout
Fixed in e4916dd.
--
Father Chrysostomos
p5pRT commentedon Aug 25, 2014
The RT System itself - Status changed from 'new' to 'open'
p5pRT commentedon Aug 25, 2014
@cpansprout - Status changed from 'open' to 'pending release'
p5pRT commentedon Jun 2, 2015
From @khwilliamson
Thanks for submitting this ticket
The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket
--
Karl Williamson for the Perl 5 porters team
p5pRT commentedon Jun 2, 2015
@khwilliamson - Status changed from 'pending release' to 'resolved'