From: Matt S Trout Date: Tue, 24 Apr 2007 22:04:02 +0000 (+0000) Subject: oops. props to chapman for the spot X-Git-Tag: v0.08010~162 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df65edd2bba5057f4a0b1fc720efed790a4a41fd;p=dbsrgits%2FDBIx-Class.git oops. props to chapman for the spot --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 52bb889..6d5b67d 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -571,13 +571,13 @@ It's as simple as overriding the C method. Note the use of C. sub new { - my ( $self, $attrs ) = @_; + my ( $class, $attrs ) = @_; $attrs->{foo} = 'bar' unless defined $attrs->{foo}; - $self->next::method($attrs); + my $new = $class->next::method($attrs); - return $self; + return $new; } For more information about C, look in the L