From: Jason McIntosh Date: Tue, 22 Jan 2013 03:17:47 +0000 (-0500) Subject: Clarifying that the "around" method modifier can come from Moose X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dffda3a29c51a478d2f219a2d08b0de6975f9103;p=dbsrgits%2FDBIx-Class-Historic.git Clarifying that the "around" method modifier can come from Moose Also 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.pm b/lib/DBIx/Class.pm index 15718f6..41787d3 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -393,6 +393,8 @@ jguenther: Justin Guenther jhannah: Jay Hannah +jmac: Jason McIntosh + jnapiorkowski: John Napiorkowski jon: Jon Schutz diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 56b3250..328c891 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -1941,8 +1941,9 @@ 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, +L or L modules): around number => sub { my ($orig, $self) = (shift, shift); @@ -1953,7 +1954,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).