From: Rafael Garcia-Suarez Date: Tue, 24 May 2005 11:22:21 +0000 (+0000) Subject: The tokenizer should expect an operator after qw(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3480a8d2d46562b783befbcecf951d5a2b4067d7;p=p5sagit%2Fp5-mst-13.2.git The tokenizer should expect an operator after qw(). This fixes [perl #35885] qw and x operators doesn't mix p4raw-id: //depot/perl@24560 --- diff --git a/t/op/repeat.t b/t/op/repeat.t index e728413..d1083e8 100755 --- a/t/op/repeat.t +++ b/t/op/repeat.t @@ -6,7 +6,7 @@ BEGIN { } require './test.pl'; -plan(tests => 41); +plan(tests => 42); # compile time @@ -151,3 +151,6 @@ is(77, scalar ((1,7)x2), 'stack truncation'); } is($y, 'abcdabcd'); } + +# [perl #35885] +is( (join ',', (qw(a b c) x 3)), 'a,b,c,a,b,c,a,b,c', 'x on qw produces list' ); diff --git a/toke.c b/toke.c index d496f48..874f8ab 100644 --- a/toke.c +++ b/toke.c @@ -4956,6 +4956,7 @@ Perl_yylex(pTHX) s = scan_str(s,FALSE,FALSE); if (!s) missingterm((char*)0); + PL_expect = XOPERATOR; force_next(')'); if (SvCUR(PL_lex_stuff)) { OP *words = Nullop;