From: Jason McIntosh Date: Tue, 22 Jan 2013 03:17:47 +0000 (-0500) Subject: Clarifying that the "around" method modifier can come from Moose, and adding a traili... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb9965718958c89331e3a5fcdf55bd2f92f7aca9;p=dbsrgits%2FDBIx-Class-Historic.git Clarifying that the "around" method modifier can come from Moose, and adding a trailing semicolon to the "around" example. (This way, it better agrees with the information in Manual::FAQ). --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 56b3250..f5990eb 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -1941,8 +1941,8 @@ just looking for this. For example, say that you have three columns, C, C, and C. You would like to make changes to C and have C be automagically set to the value of C squared. -You can accomplish this by wrapping the C accessor with -L: +You can accomplish this by wrapping the C accessor with the C method modifier, available through either +L or L): around number => sub { my ($orig, $self) = (shift, shift); @@ -1953,7 +1953,7 @@ L: } $self->$orig(@_); - } + }; Note that the hard work is done by the call to C<< $self->$orig >>, which redispatches your call to store_column in the superclass(es).