This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Skip PL_expect assignment under KEY_require
authorFather Chrysostomos <sprout@cpan.org>
Fri, 22 Aug 2014 04:44:39 +0000 (21:44 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Aug 2014 02:02:56 +0000 (19:02 -0700)
commit446f9afa4e02ee11403c0501830c536e12779537
tree286ae483827f83e52c78745d419b3e6721cf8d9f
parent7a61bf3cf07a5904bbd35007213ef2a3115e6159
toke.c: Skip PL_expect assignment under KEY_require

Only set PL_expect here when force_word has realised there is no word
there and has not called force_next.  Setting PL_expect after a call
to force_next is useless, as force_next causes its saved value to be
restored when the next token is emitted.

Changing this may seem silly, as an unconditional assignment may even
be faster, but this will allow me to eliminate PL_lex_expect and make
PL_expect handling simpler than before.
toke.c