[Bast-commits] r3196 - in trunk/DBIx-Class: . lib/DBIx/Class/Manual
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Mon Apr 16 13:55:51 GMT 2007
Author: marcus
Date: 2007-04-16 13:55:44 +0100 (Mon, 16 Apr 2007)
New Revision: 3196
Modified:
trunk/DBIx-Class/Changes
trunk/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod
Log:
Updated cookbook example
Modified: trunk/DBIx-Class/Changes
===================================================================
--- trunk/DBIx-Class/Changes 2007-04-16 02:05:34 UTC (rev 3195)
+++ trunk/DBIx-Class/Changes 2007-04-16 12:55:44 UTC (rev 3196)
@@ -1,5 +1,7 @@
Revision history for DBIx::Class
+ - Update cookbook example for overriding new
+
0.07005 2007-01-10 18:36:00
- fixup changes file
- remove erroneous .orig files - oops
Modified: trunk/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod
===================================================================
--- trunk/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod 2007-04-16 02:05:34 UTC (rev 3195)
+++ trunk/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod 2007-04-16 12:55:44 UTC (rev 3196)
@@ -571,11 +571,13 @@
C<next::method>.
sub new {
- my ( $class, $attrs ) = @_;
+ my ( $self, $attrs ) = @_;
$attrs->{foo} = 'bar' unless defined $attrs->{foo};
- $class->next::method($attrs);
+ $self->next::method($attrs);
+
+ return $self;
}
For more information about C<next::method>, look in the L<Class::C3>
More information about the Bast-commits
mailing list