From: Dave Rolsky Date: Sun, 25 Jul 2010 15:22:57 +0000 (-0500) Subject: Delta entry editing X-Git-Tag: 1.09~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da7efd4c98f124dad313345431a91aa9b1dd0100;p=gitmo%2FMoose.git Delta entry editing --- diff --git a/lib/Moose/Manual/Delta.pod b/lib/Moose/Manual/Delta.pod index 36bd90b..0cec647 100644 --- a/lib/Moose/Manual/Delta.pod +++ b/lib/Moose/Manual/Delta.pod @@ -44,16 +44,15 @@ them is just broken in that case. =item Reversed logic when defining which options can be changed -L now uses reversed logic when defining which -options can be changed. By default all options are allowed to be -changed. The previous behaviour required each option to be whitelisted -for changing using C method. This -method has been removed. New method C -can now be used to prevent certain options from being changeable. +L now allows all options to be changed in an +overridden attribute. The previous behaviour required each option to be +whitelisted using the C method. This method has +been removed, and there is a new method, C, +which can now be used to prevent certain options from being changeable. -This also now only throws an error if the illegal option was actually -changed. If the superclass version of an attribute didn't specify this -option at all, the subclass version can still add it as an option. +In addition, we only throw an error if the illegal option is actually +changed. If the superclass didn't specify this option at all when defining the +attribute, the subclass version can still add it as an option. Example of overriding this in an attribute trait: @@ -61,12 +60,12 @@ Example of overriding this in an attribute trait: use Moose::Role; has 'my_illegal_option' => ( - isa => 'CodeRef', - is => 'rw', + isa => 'CodeRef', + is => 'rw', ); around illegal_options_for_inheritance => sub { - return (shift->(@_), qw/my_illegal_option/); + return ( shift->(@_), qw/my_illegal_option/ ); }; =back