summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-01-19 11:42:21 +1100
committerTony Cook <tony@develop-help.com>2016-02-08 14:52:57 +1100
commit000814da477053c7627c7ace5ca3ce3d4c4aad08 (patch)
tree1ff6de6590b4c2c21edd39ab6bb98ece030c2246 /sv.c
parentf05081b8ef229712c83a6f19b217489cf5e5ab25 (diff)
downloadperl-000814da477053c7627c7ace5ca3ce3d4c4aad08.tar.gz
[perl #124387] call AUTOLOAD when DESTROY isn't defined
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 42baa293ee..1650ed5179 100644
--- a/sv.c
+++ b/sv.c
@@ -6776,6 +6776,7 @@ S_curse(pTHX_ SV * const sv, const bool check_refcnt) {
if (HvNAME(stash)) {
CV* destructor = NULL;
struct mro_meta *meta;
+
assert (SvOOK(stash));
DEBUG_o( Perl_deb(aTHX_ "Looking for DESTROY method for %s\n",
@@ -6791,7 +6792,7 @@ S_curse(pTHX_ SV * const sv, const bool check_refcnt) {
}
else {
GV * const gv =
- gv_fetchmeth_autoload(stash, "DESTROY", 7, 0);
+ gv_fetchmethod_pvn_flags(stash, "DESTROY", 7, GV_AUTOLOAD);
if (gv) destructor = GvCV(gv);
meta->destroy_gen = PL_sub_generation;
meta->destroy = destructor;