diff options
-rw-r--r-- | ext/Fcntl/Fcntl.pm | 2 | ||||
-rw-r--r-- | op.c | 11 | ||||
-rwxr-xr-x | t/comp/proto.t | 9 | ||||
-rw-r--r-- | toke.c | 7 |
4 files changed, 21 insertions, 8 deletions
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 6214323c31..74de3dfc65 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -78,7 +78,7 @@ $VERSION = "1.03"; sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; - my $val = constant($constname, @_ ? $_[0] : 0); + my $val = constant($constname, (@_ && (caller(0))[4]) ? $_[0] : 0); if ($! != 0) { if ($! =~ /Invalid/) { $AutoLoader::AUTOLOAD = $AUTOLOAD; @@ -1645,6 +1645,12 @@ fold_constants(register OP *o) case OP_LCFIRST: case OP_UC: case OP_LC: + case OP_SLT: + case OP_SGT: + case OP_SLE: + case OP_SGE: + case OP_SCMP: + if (o->op_private & OPpLOCALE) goto nope; } @@ -4599,9 +4605,10 @@ ck_subr(OP *o) goto wrapref; { OP* kid = o2; - o2 = newUNOP(OP_RV2GV, 0, kid); - o2->op_sibling = kid->op_sibling; + OP* sib = kid->op_sibling; kid->op_sibling = 0; + o2 = newUNOP(OP_RV2GV, 0, kid); + o2->op_sibling = sib; prev->op_sibling = o; } goto wrapref; diff --git a/t/comp/proto.t b/t/comp/proto.t index d1cfede8af..080110bdcc 100755 --- a/t/comp/proto.t +++ b/t/comp/proto.t @@ -362,17 +362,18 @@ printf "ok %d\n",$i++; ## ## -testing \&an_array_ref, '\@'; +testing \&array_ref_plus, '\@@'; -sub an_array_ref (\@) { +sub array_ref_plus (\@@) { print "# \@_ = (",join(",",@_),")\n"; - print "not " unless ref($_[0]) && 1 == @{$_[0]}; + print "not " unless @_ == 2 && ref($_[0]) && 1 == @{$_[0]} && $_[1] eq 'x'; printf "ok %d\n",$i++; @{$_[0]} = (qw(ok)," ",$i++,"\n"); } @array = ('a'); -an_array_ref @array; +{ my @more = ('x'); + array_ref_plus @array, @more; } print "not " unless @array == 4; print @array; @@ -2014,8 +2014,13 @@ yylex(void) else lex_brackstack[lex_brackets++] = XOPERATOR; s = skipspace(s); - if (*s == '}') + if (*s == '}') { + if (expect == XSTATE) { + lex_brackstack[lex_brackets-1] = XSTATE; + break; + } OPERATOR(HASHBRACK); + } /* This hack serves to disambiguate a pair of curlies * as being a block or an anon hash. Normally, expectation * determines that, but in cases where we're not in a |