This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Remove redundant PL_expect check
authorFather Chrysostomos <sprout@cpan.org>
Sat, 13 Sep 2014 19:13:29 +0000 (12:13 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 13 Sep 2014 19:22:54 +0000 (12:22 -0700)
PL_expect is only ever XREF when we already know there is an open
brace.  So we would never even get to this code path.

toke.c

diff --git a/toke.c b/toke.c
index 028c685..edd458d 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6215,7 +6215,7 @@ Perl_yylex(pTHX)
            }
            /* avoid v123abc() or $h{v1}, allow C<print v10;> */
            if (!isALPHA(*start) && (PL_expect == XTERM
-                       || PL_expect == XREF || PL_expect == XSTATE
+                       || PL_expect == XSTATE
                        || PL_expect == XTERMORDORDOR)) {
                GV *const gv = gv_fetchpvn_flags(s, start - s,
                                                     UTF ? SVf_UTF8 : 0, SVt_PVCV);