summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-06-22 13:56:15 -0500
committerJesse Luehrs <doy@tozt.net>2012-06-23 12:55:55 -0500
commit61c2a935ea391cd3113b03765aa52a40f3bc77fc (patch)
tree59d06411d1e2e217e7e5e8662dae04af9d223fe5 /universal.c
parent68b40612054cc4269bdb1112df64c078975b1467 (diff)
downloadperl-61c2a935ea391cd3113b03765aa52a40f3bc77fc.tar.gz
also make sure ->isa works on undeclared packages
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/universal.c b/universal.c
index 383feaae00..a7c480f52c 100644
--- a/universal.c
+++ b/universal.c
@@ -164,6 +164,8 @@ Perl_sv_derived_from_pvn(pTHX_ SV *sv, const char *const name, const STRLEN len,
}
else {
stash = gv_stashsv(sv, 0);
+ if (!stash)
+ stash = gv_stashpv("UNIVERSAL", 0);
}
return stash ? isa_lookup(stash, name, len, flags) : FALSE;