X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/0f31cffe78d3a5cfa348eb1c3208e5daec5777d9..a30ac1520b1f2865b12dda3a3ca7d9715cb02229:/toke.c diff --git a/toke.c b/toke.c index 090a56b..b1bd0d7 100644 --- 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); }