summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perl.pod5
-rw-r--r--toke.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/pod/perl.pod b/pod/perl.pod
index 8bc94faaf4..1b886d01e0 100644
--- a/pod/perl.pod
+++ b/pod/perl.pod
@@ -298,7 +298,10 @@ and syswrite().)
While none of the built-in data types have any arbitrary size limits
(apart from memory size), there are still a few arbitrary limits: a
-given variable name may not be longer than 251 characters.
+given variable name may not be longer than 251 characters. Line numbers
+displayed by diagnostics are internally stored as short integers,
+so they are limited to a maximum of 65535 (higher numbers usually being
+affected by wraparound).
You may mail your bug reports (be sure to include full configuration
information as output by the myconfig program in the perl source tree,
diff --git a/toke.c b/toke.c
index 090a56b1a5..b1bd0d701c 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);
}