This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid side-effecting source held in scalar
authorZefram <zefram@fysh.org>
Wed, 13 Oct 2010 20:05:54 +0000 (21:05 +0100)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 21 Oct 2010 12:52:52 +0000 (05:52 -0700)
commit805700c1a37c475915b7e2c565a2b4ac1dbe5a97
tree69c7f84531d6402981ab824a30f15cc9763cdac5
parente4a21daa4e972fdca58792685dc40f8626070430
avoid side-effecting source held in scalar

Syntax plugins can modify the source being parsed.  It's fine for
them to modify the lexer buffer, but this must not be the same scalar
that was supplied to lex_start() and may be in use outside.  Therefore
always copy the scalar in lex_start() rather than just referencing it.
Fixes [perl #78358].
MANIFEST
ext/XS-APItest/t/stuff_modify_bug.t [new file with mode: 0644]
toke.c