Re: [perl #18479] Error when no strict refs in effect
Slaven Rezic [Mon, 18 Nov 2002 22:50:04 +0000 (23:50 +0100)]
Message-ID: <87smxya6pf.fsf@vran.herceg.de>

p4raw-id: //depot/perl@18176

pp_ctl.c

index a91eb38..a43e629 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2732,6 +2732,12 @@ S_doeval(pTHX_ int gimme, OP** startop)
            Perl_croak(aTHX_ "%sCompilation failed in regexp",
                       (*msg ? msg : "Unknown error\n"));
        }
+       else {
+           char* msg = SvPVx(ERRSV, n_a);
+           if (!*msg) {
+               sv_setpv(ERRSV, "Compilation error");
+           }
+       }
        RETPUSHUNDEF;
     }
     CopLINE_set(&PL_compiling, 0);