diff options
-rw-r--r-- | opcode.h | 2 | ||||
-rwxr-xr-x | t/comp/bproto.t | 5 | ||||
-rw-r--r-- | toke.c | 7 |
3 files changed, 10 insertions, 4 deletions
@@ -1567,7 +1567,7 @@ EXT U32 PL_opargs[] = { 0x0022281c, /* vec */ 0x0122291c, /* index */ 0x0122291c, /* rindex */ - 0x0004290f, /* sprintf */ + 0x0004280f, /* sprintf */ 0x00042805, /* formline */ 0x0001379e, /* ord */ 0x0001378e, /* chr */ diff --git a/t/comp/bproto.t b/t/comp/bproto.t index 699ea57a36..01efb8401c 100755 --- a/t/comp/bproto.t +++ b/t/comp/bproto.t @@ -8,7 +8,7 @@ BEGIN { unshift @INC, '../lib'; } -print "1..7\n"; +print "1..10\n"; my $i = 1; @@ -38,4 +38,7 @@ q[ scalar(&foo,$bar); defined &foo, &foo, &foo; undef &foo, $bar; uc $bar,$bar; + grep(not($bar), $bar); + grep(not($bar, $bar), $bar); + grep((not $bar, $bar, $bar), $bar); ]; @@ -120,7 +120,7 @@ int* yychar_pointer = NULL; * LOOPX : loop exiting command (goto, last, dump, etc) * FTST : file test operator * FUN0 : zero-argument function - * FUN1 : not used + * FUN1 : not used, except for not, which isn't a UNIOP * BOop : bitwise or or xor * BAop : bitwise and * SHop : shift operator @@ -4227,7 +4227,10 @@ Perl_yylex(pTHX) OPERATOR(USE); case KEY_not: - OPERATOR(NOTOP); + if (*s == '(' || (s = skipspace(s), *s == '(')) + FUN1(OP_NOT); + else + OPERATOR(NOTOP); case KEY_open: s = skipspace(s); |