This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Undo #2395, seems more like a problem in netbsd-current.
[perl5.git] / op.c
diff --git a/op.c b/op.c
index e52aa4f..d98cbd9 100644 (file)
--- a/op.c
+++ b/op.c
@@ -570,6 +570,16 @@ find_threadsv(char *name)
        case '`':
        case '\'':
            PL_sawampersand = TRUE;
+           /* FALL THROUGH */
+       case '1':
+       case '2':
+       case '3':
+       case '4':
+       case '5':
+       case '6':
+       case '7':
+       case '8':
+       case '9':
            SvREADONLY_on(sv);
            /* FALL THROUGH */
 
@@ -2597,6 +2607,7 @@ package(OP *o)
        sv_setpv(PL_curstname,"<none>");
        PL_curstash = Nullhv;
     }
+    PL_hints |= HINT_BLOCK_SCOPE;
     PL_copline = NOLINE;
     PL_expect = XSTATE;
 }
@@ -5053,6 +5064,8 @@ ck_sort(OP *o)
                kid->op_next = k;
            o->op_flags |= OPf_SPECIAL;
        }
+       else if (kid->op_type == OP_RV2SV || kid->op_type == OP_PADSV)
+           null(cLISTOPo->op_first->op_sibling);
     }
 
     return o;