summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-07-26 17:49:14 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-07-26 17:49:14 +0000
commited8504609e65bf608915df5053decb2c1e5c56e9 (patch)
tree2ab912c12ae7a33d56d4a296bbaaeac7d631b720 /gv.c
parentcc50a2034c8f38d702b126ee0ae87fcad255227a (diff)
downloadperl-ed8504609e65bf608915df5053decb2c1e5c56e9.tar.gz
Allow "sub AUTOLOAD;" to stop AUTOLOAD inheritance,
from Graham Barr in the module list. p4raw-id: //depot/perl@6444
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index f18f174d6e..22e419ec24 100644
--- a/gv.c
+++ b/gv.c
@@ -418,6 +418,9 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method)
return Nullgv;
cv = GvCV(gv);
+ if (!CvROOT(cv))
+ return Nullgv;
+
/*
* Inheriting AUTOLOAD for non-methods works ... for now.
*/