From: Shawn M Moore Date: Thu, 30 Apr 2009 02:26:16 +0000 (-0400) Subject: More FAQ content about method modifiers X-Git-Tag: 0.77~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e30e57c6a8ea282d5f3c1f2af33fbb44023a2c42;p=gitmo%2FMoose.git More FAQ content about method modifiers --- diff --git a/lib/Moose/Cookbook/FAQ.pod b/lib/Moose/Cookbook/FAQ.pod index 1fff37c..9ac546f 100644 --- a/lib/Moose/Cookbook/FAQ.pod +++ b/lib/Moose/Cookbook/FAQ.pod @@ -233,8 +233,17 @@ explain it on #moose or the mailing list. =head3 How can I affect the values in C<@_> using C? You can't, actually: C only runs before the main method, -and it cannot easily affect the method's execution. What you want is -an C method. +and it cannot easily affect the method's execution. + +You similarly can't use C to affect the return value of a +method. + +We limit C and C because this lets you write more +concise code. You do not have to worry about passing C<@_> to the +original method, or forwarding its response (being careful to preserve +context). + +The C method modifier has neither of these limitations. =head3 Can I use C to stop execution of a method?