From: John Napiorkowski Date: Wed, 14 Dec 2011 22:06:55 +0000 (-0500) Subject: added some docs regarding how handles works, and also more on Moose compat X-Git-Tag: v0.009013~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69673ca79d003aacb02fd1e9d6bea2755d6f6c49;hp=edb9977c5fa2b2a737ab19ce83f934253c74611f;p=gitmo%2FMoo.git added some docs regarding how handles works, and also more on Moose compat --- diff --git a/lib/Moo.pm b/lib/Moo.pm index 9214507..6b5147e 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -307,7 +307,10 @@ L Takes a string - handles => 'Robot' + handles => 'RobotRole' + +Where C is a role (L) that defines an interface which +becomes the list of methods to handle. Takes a list of methods @@ -457,6 +460,27 @@ C is not supported since the author considers it a bad idea. C is not supported since it's a very poor replacement for POD. +Handling of warnings: when you C we enable FATAL warnings. The nearest +similar invocation for L would be: + + use Moose; + use warnings FATAL => "all"; + +Additionally, L supports a set of attribute option shortcuts intended to +reduce common boilerplate. The set of shortcuts is the same as in the L +module L. So if you: + + package MyClass; + use Moo; + +The nearest L invocation would be: + + package MyClass; + + use Moose; + use warnings FATAL => "all"; + use MooseX::AttributeShortcuts; + =head1 AUTHOR mst - Matt S. Trout (cpan:MSTROUT)