Test both the scalar and list contexts.
[p5sagit/p5-mst-13.2.git] / perl.c
diff --git a/perl.c b/perl.c
index f81648c..ff851b4 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1984,6 +1984,7 @@ Perl_moreswitches(pTHX_ char *s)
     case '0':
     {
        dTHR;
+       numlen = 0;                     /* disallow underscores */
        rschar = (U32)scan_oct(s, 4, &numlen);
        SvREFCNT_dec(PL_nrs);
        if (rschar & ~((U8)~0))
@@ -2099,6 +2100,7 @@ Perl_moreswitches(pTHX_ char *s)
        if (isDIGIT(*s)) {
            PL_ors = savepv("\n");
            PL_orslen = 1;
+           numlen = 0;                 /* disallow underscores */
            *PL_ors = (char)scan_oct(s, 3 + (*s == '0'), &numlen);
            s += numlen;
        }
@@ -2137,7 +2139,8 @@ Perl_moreswitches(pTHX_ char *s)
                }
            } else {
                 if (s == start)
-                    Perl_croak(aTHX_ "Module name required with -M option");
+                    Perl_croak(aTHX_ "Module name required with -%c option",
+                              s[-1]);
                sv_catpvn(sv, start, s-start);
                sv_catpv(sv, " split(/,/,q{");
                sv_catpv(sv, ++s);
@@ -3324,6 +3327,10 @@ S_init_perllib(pTHX)
     incpush(PERL_VENDORLIB_STEM, FALSE, TRUE);
 #endif
 
+#ifdef PERL_OTHERLIBDIRS
+    incpush(PERL_OTHERLIBDIRS, TRUE, TRUE);
+#endif
+
     if (!PL_tainting)
        incpush(".", FALSE, FALSE);
 }