gv_efullname3() could return NULL, so mro::_nextcan() must cope (and croak()).
Florian Ragwitz [Sat, 22 Aug 2009 09:29:04 +0000 (11:29 +0200)]
XS.xs

diff --git a/XS.xs b/XS.xs
index 94ef956..4ced6b8 100644 (file)
--- a/XS.xs
+++ b/XS.xs
@@ -411,8 +411,14 @@ XS(XS_Class_C3_XS_nextcan)
 
             gv_efullname3(sv, cvgv, NULL);
 
-            fq_subname = SvPVX(sv);
-            fq_subname_len = SvCUR(sv);
+            if (SvPOK(sv)) {
+                fq_subname = SvPVX(sv);
+                fq_subname_len = SvCUR(sv);
+
+                subname = strrchr(fq_subname, ':');
+            } else {
+                subname = NULL;
+            }
 
             subname = strrchr(fq_subname, ':');
             if(!subname)