gv_efullname3() could return NULL, so mro::_nextcan() must cope (and croak()).
Nicholas Clark [Fri, 21 Aug 2009 21:11:47 +0000 (22:11 +0100)]
ext/mro/mro.xs

index f8a1ee7..69557a6 100644 (file)
@@ -537,10 +537,15 @@ mro__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)
                 Perl_croak(aTHX_ "next::method/next::can/maybe::next::method cannot find enclosing method");