lexical warnings update (warning.t fails one test
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 21d0335..af6394d 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1022,11 +1022,11 @@ PP(pp_sort)
 PP(pp_range)
 {
     if (GIMME == G_ARRAY)
-       return cCONDOP->op_true;
+       return NORMAL;
     if (SvTRUEx(PAD_SV(PL_op->op_targ)))
-       return cCONDOP->op_false;
+       return cLOGOP->op_other;
     else
-       return cCONDOP->op_true;
+       return NORMAL;
 }
 
 PP(pp_flip)
@@ -1034,7 +1034,7 @@ PP(pp_flip)
     djSP;
 
     if (GIMME == G_ARRAY) {
-       RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
+       RETURNOP(((LOGOP*)cUNOP->op_first)->op_other);
     }
     else {
        dTOPss;
@@ -1052,7 +1052,7 @@ PP(pp_flip)
            else {
                sv_setiv(targ, 0);
                SP--;
-               RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
+               RETURNOP(((LOGOP*)cUNOP->op_first)->op_other);
            }
        }
        sv_setpv(TARG, "");
@@ -2984,9 +2984,13 @@ PP(pp_require)
     SAVEHINTS();
     PL_hints = 0;
     SAVEPPTR(PL_compiling.cop_warnings);
-    PL_compiling.cop_warnings = ((PL_dowarn & G_WARN_ALL_ON) ? WARN_ALL 
-                                                            : WARN_NONE);
+    if (PL_dowarn & G_WARN_ALL_ON)
+        PL_compiling.cop_warnings = WARN_ALL ;
+    else if (PL_dowarn & G_WARN_ALL_OFF)
+        PL_compiling.cop_warnings = WARN_NONE ;
+    else 
+        PL_compiling.cop_warnings = WARN_STD ;
+    
     /* switch to eval mode */
 
     push_return(PL_op->op_next);
@@ -3048,8 +3052,7 @@ PP(pp_entereval)
     SAVEHINTS();
     PL_hints = PL_op->op_targ;
     SAVEPPTR(PL_compiling.cop_warnings);
-    if (PL_compiling.cop_warnings != WARN_ALL 
-       && PL_compiling.cop_warnings != WARN_NONE){
+    if (!specialWARN(PL_compiling.cop_warnings)) {
         PL_compiling.cop_warnings = newSVsv(PL_compiling.cop_warnings) ;
         SAVEFREESV(PL_compiling.cop_warnings) ;
     }