This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mention limit on line numbers reported by diagnostics
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 090a56b..b1bd0d7 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4964,7 +4964,6 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type)
     bool oldcatch = CATCH_GET;
     SV **cvp;
     SV *cv, *typesv;
-    char buf[128];
            
     if (!table) {
        yyerror("%^H is not defined");
@@ -4972,6 +4971,7 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type)
     }
     cvp = hv_fetch(table, key, strlen(key), FALSE);
     if (!cvp || !SvOK(*cvp)) {
+       char buf[128];
        sprintf(buf,"$^H{%s} is not defined", key);
        yyerror(buf);
        return sv;
@@ -5017,6 +5017,7 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type)
     POPSTACK;
 
     if (!SvOK(res)) {
+       char buf[128];
        sprintf(buf,"Call to &{$^H{%s}} did not return a defined value", key);
        yyerror(buf);
     }