Don't try to get a CV from globs that are references, but not SvROK.
Florian Ragwitz [Sat, 15 Nov 2008 09:03:22 +0000 (09:03 +0000)]
This might happen on newer perls where SVt_RV has been merged into SVt_IV.
Fixes RT#39149.

MOP.xs

diff --git a/MOP.xs b/MOP.xs
index 73d2df5..50be4f4 100644 (file)
--- 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);