From: Florian Ragwitz <rafl@debian.org>
Date: Sat, 15 Nov 2008 09:03:22 +0000 (+0000)
Subject: Don't try to get a CV from globs that are references, but not SvROK.
X-Git-Tag: 0.69_01~3
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd8c46e59345b325ecdfad75146577219d2459fa;p=gitmo%2FClass-MOP.git

Don't try to get a CV from globs that are references, but not SvROK.

This might happen on newer perls where SVt_RV has been merged into SVt_IV.
Fixes RT#39149.
---

diff --git a/MOP.xs b/MOP.xs
index 73d2df5..50be4f4 100644
--- a/MOP.xs
+++ b/MOP.xs
@@ -131,6 +131,10 @@ get_all_package_symbols(self, ...)
                         case SVt_RV:
                             /* BAH! constants are horrible */
 
+                            if (!SvROK (gv)) {
+                                continue;
+                            }
+
                             /* we don't really care about the length,
                                but that's the API */
                             key = HePV(he, keylen);