summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Pritikin <joshua.pritikin@db.com>1998-06-26 06:02:32 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-28 20:36:08 +0000
commit3e0ccd427679e11020bfe0a22532e0a9a22a3d28 (patch)
treef341fc84d86107ad3a689f21ff7d387538876400
parent8d37f93276d8a61b3f2bde2358425cba26b9b98d (diff)
downloadperl-3e0ccd427679e11020bfe0a22532e0a9a22a3d28.tar.gz
improve recursive error messages!
Message-Id: <H00000e500081d28@MHS> p4raw-id: //depot/perl@1245
-rw-r--r--gv.c3
-rw-r--r--pod/perldiag.pod7
-rw-r--r--universal.c2
3 files changed, 9 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 0a363704cd..ea78d20048 100644
--- a/gv.c
+++ b/gv.c
@@ -162,7 +162,8 @@ gv_fetchmeth(HV *stash, char *name, STRLEN len, I32 level)
if (!stash)
return 0;
if ((level > 100) || (level < -100))
- croak("Recursive inheritance detected");
+ croak("Recursive inheritance detected while looking for method '%s' in package '%s'",
+ name, HvNAME(stash));
DEBUG_o( deb("Looking for method %s in package %s\n",name,HvNAME(stash)) );
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index d8323f2328..b58885609b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -2069,11 +2069,16 @@ Check your logic flow.
desired output is compiled into Perl, which entails some overhead,
which is why it's currently left out of your copy.
-=item Recursive inheritance detected
+=item Recursive inheritance detected in package '%s'
(F) More than 100 levels of inheritance were used. Probably indicates
an unintended loop in your inheritance hierarchy.
+=item Recursive inheritance detected while looking for method '%s' in package '%s'
+
+(F) More than 100 levels of inheritance were encountered while invoking a
+method. Probably indicates an unintended loop in your inheritance hierarchy.
+
=item Reference found where even-sized list expected
(W) You gave a single reference where Perl was expecting a list with
diff --git a/universal.c b/universal.c
index 72da1e4937..ef4f5b3066 100644
--- a/universal.c
+++ b/universal.c
@@ -21,7 +21,7 @@ isa_lookup(HV *stash, char *name, int len, int level)
return &sv_yes;
if (level > 100)
- croak("Recursive inheritance detected");
+ croak("Recursive inheritance detected in package '%s'", HvNAME(stash));
gvp = (GV**)hv_fetch(stash, "::ISA::CACHE::", 14, FALSE);