18 STATIC int unset_export_flag (pTHX_ SV *sv, MAGIC *mg);
20 STATIC MGVTBL export_flag_vtbl = {
22 unset_export_flag, /* set */
38 export_flag_is_set (pTHX_ SV *sv)
40 MAGIC *mg, *moremagic;
42 if (SvTYPE(SvRV(sv)) != SVt_PVGV) {
46 for (mg = SvMAGIC(SvRV(sv)); mg; mg = moremagic) {
47 moremagic = mg->mg_moremagic;
49 if (mg->mg_type == PERL_MAGIC_ext && mg->mg_virtual == &export_flag_vtbl) {
58 unset_export_flag (pTHX_ SV *sv, MAGIC *mymg)
60 MAGIC *mg, *prevmagic = NULL, *moremagic = NULL;
62 for (mg = SvMAGIC(sv); mg; prevmagic = mg, mg = moremagic) {
63 moremagic = mg->mg_moremagic;
75 prevmagic->mg_moremagic = moremagic;
78 SvMAGIC_set(sv, moremagic);
81 mg->mg_moremagic = NULL;
88 MODULE = Moose PACKAGE = Moose::Exporter
91 _flag_as_reexport (SV *sv)
94 sv_magicext(SvRV(sv), NULL, PERL_MAGIC_ext, &export_flag_vtbl, NULL, 0);
97 _export_is_flagged (SV *sv)
100 RETVAL = export_flag_is_set(aTHX_ sv);