From: Matt S Trout <mst@shadowcat.co.uk> Date: Tue, 24 Apr 2007 22:04:02 +0000 (+0000) Subject: oops. props to chapman for the spot X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df65edd2bba5057f4a0b1fc720efed790a4a41fd;p=dbsrgits%2FDBIx-Class-Historic.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<new> method. Note the use of C<next::method>. 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<next::method>, look in the L<Class::C3>