From: Matt S Trout Date: Sat, 21 Jul 2012 14:42:32 +0000 (+0000) Subject: document Moo versus Any::Moose in brief with article link X-Git-Tag: v1.000001~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c687d0168a34cd04fa5e4dbda4c0f390bb8c4abc;p=gitmo%2FMoo.git document Moo versus Any::Moose in brief with article link --- diff --git a/Changes b/Changes index 87d9283..57e5ebd 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - document Moo versus Any::Moose in brief with article link - remove quote_sub from SYNOPSIS and has docs, expand Sub::Quote section - localize @_ when inlining quote_sub'ed isa checks (fixes lazy+isa+default) - ensure constructor gets regenerated if forced early by metaclass inflation diff --git a/lib/Moo.pm b/lib/Moo.pm index 9ccab7f..2fd9419 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -298,6 +298,25 @@ 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. +=head1 MOO VERSUS ANY::MOOSE + +L will load L normally, and L in a program using +L - which theoretically allows you to get the startup time of L +without disadvantaging L users. + +Sadly, this doesn't entirely work, since the selection is load order dependent +- L's metaclass inflation system explained above in L is +significantly more reliable. + +So if you want to write a CPAN module that loads fast or has only pure perl +dependencies but is also fully usable by L users, you should be using +L. + +For a full explanation, see the article +L which explains +the differing strategies in more detail and provides a direct example of +where L succeeds and L fails. + =head1 IMPORTED METHODS =head2 new