From: Florian Ragwitz Date: Thu, 4 Dec 2008 02:03:26 +0000 (+0000) Subject: Make the xs version of get_all_package_symbols return coderefs for stub functions. X-Git-Tag: 0.71_01~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=15b55537cbd9814a7ceb4633c5e1bce009b9d38f;p=gitmo%2FClass-MOP.git Make the xs version of get_all_package_symbols return coderefs for stub functions. --- diff --git a/MOP.xs b/MOP.xs index 06c828c..11c888e 100644 --- a/MOP.xs +++ b/MOP.xs @@ -258,6 +258,16 @@ get_all_package_symbols(self, ...) SV *fq; switch( SvTYPE(gv) ) { + case SVt_PV: + case SVt_IV: + /* expand the gv into a real typeglob if it + * contains stub functions and we were asked to + * return CODE symbols */ + if (*type == 'C') { + key = HePV(he, keylen); + gv_init((GV *)gv, stash, key, keylen, GV_ADDMULTI); + } + /* fall through */ case SVt_PVGV: switch (*type) { case 'C': sv = (SV *)GvCVu(gv); break; /* CODE */