Make File::Copy::rmscopy return the documented values.
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 6bb5b40..eab9624 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3255,6 +3255,11 @@ PP(pp_require)
            Perl_load_module(aTHX_ 0, newSVpvs("feature"), NULL, importsv, NULL);
            LEAVE;
        }
+       /* If a version >= 5.11.0 is requested, strictures are on by default! */
+       if (PL_compcv &&
+               vcmp(sv, sv_2mortal(upg_version(newSVnv(5.011000), FALSE))) >= 0) {
+           PL_hints |= (HINT_STRICT_REFS | HINT_STRICT_SUBS | HINT_STRICT_VARS);
+       }
 
        RETPUSHYES;
     }
@@ -4393,6 +4398,10 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
        SP -= 2;
        goto sm_any_scalar;
     }
+    else if (!SvOK(d)) {
+       /* undef ~~ scalar ; we already know that the scalar is SvOK */
+       RETPUSHNO;
+    }
     else
   sm_any_scalar:
     if (SvNIOK(e) || (SvPOK(e) && looks_like_number(e) && SvNIOK(d))) {