From: gfx Date: Thu, 25 Mar 2010 02:33:39 +0000 (+0900) Subject: Make Mouse::XS reloadable X-Git-Tag: 0.52~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25ba356eb567d89ae015ad0789960b460c3ebf02;p=gitmo%2FMouse.git Make Mouse::XS reloadable --- diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index 3c02d18..8587b64 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -350,7 +350,9 @@ CODE: } { dMY_CXT; - if(MY_CXT.metas) croak("Cannot set metaclass storage more than once"); + if(MY_CXT.metas && ckWARN(WARN_REDEFINE)){ + Perl_warner(aTHX_ packWARN(WARN_REDEFINE), "Metaclass storage more than once"); + } MY_CXT.metas = metas; SvREFCNT_inc_simple_void_NN(metas); }