From: Matt S Trout Date: Fri, 27 Apr 2012 03:56:08 +0000 (+0000) Subject: documentation for the metaclass inflation code X-Git-Tag: v0.091000~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1fce5bc99d87d8ab982313b5abe8939559776ddc;hp=285499b502ad2354d2b1f02ec4d552eab554b086;p=gitmo%2FMoo.git documentation for the metaclass inflation code --- diff --git a/Changes b/Changes index 754a20d..e894495 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - documentation for the metaclass inflation code - better error message for broken BUILDARGS - provide 'no Moo::sification' to forcibly disable metaclass inflation - switch to Devel::GlobalDestruction to correctly disarm the diff --git a/lib/Moo.pm b/lib/Moo.pm index 9d746e1..bead1cb 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -191,6 +191,27 @@ Hence - Moo exists as its name - Minimal Object Orientation - with a pledge to make it smooth to upgrade to L when you need more than minimal features. +=head1 Moo and Moose - NEW, EXPERIMENTAL + +If L detects L being loaded, it will automatically register +metaclasses for your L and L packages, so you should be able +to use them in L code without it ever realising you aren't using +L everywhere. + +Extending a L class or consuming a L should also work. + +However, these features are new as of 0.91.0 (0.091000) so they may not +be 100% yet; please do report bugs. + +If you need to disable the metaclass creation, add: + + no Moo::sification; + +to your code before Moose is loaded, but bear in mind that this switch is +currently global and turns the mechanism off entirely, so don't put this +in library code, only in a top level script as a temporary measure while +you send a bug report. + =head1 IMPORTED METHODS =head2 new