Typing is for secretaries
[p5sagit/p5-mst-13.2.git] / mg.c
diff --git a/mg.c b/mg.c
index 328885f..d937c16 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -807,7 +807,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
        break;
     case '\023':               /* ^S */
        if (nextchar == '\0') {
-           if (PL_lex_state != LEX_NOTPARSING)
+           if (PL_parser && PL_parser->lex_state != LEX_NOTPARSING)
                SvOK_off(sv);
            else if (PL_in_eval)
                sv_setiv(sv, PL_in_eval & ~(EVAL_INREQUIRE));
@@ -2243,10 +2243,10 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
     case '1': case '2': case '3': case '4':
     case '5': case '6': case '7': case '8': case '9':
       setparen:
-           if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
+       if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
             CALLREG_NUMBUF_STORE((REGEXP * const)rx,paren,sv);
             break;
-           } else {
+       } else {
             /* Croak with a READONLY error when a numbered match var is
              * set without a previous pattern match. Unless it's C<local $1>
              */