From bb9965718958c89331e3a5fcdf55bd2f92f7aca9 Mon Sep 17 00:00:00 2001 From: Jason McIntosh Date: Mon, 21 Jan 2013 22:17:47 -0500 Subject: [PATCH] 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). --- lib/DBIx/Class/Manual/Cookbook.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 56b325095..f5990eb5a 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).