X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FCookbook.pod;h=f0004b2a89c03b0a1a3a2841ece7955904c5fc14;hb=ccbebdbc10496de4b8f64687716e737db5314ff0;hp=1cfed1d295d276eed5f40d44ccb1b914e3f17174;hpb=4b0779f4f6ad091b20387647b090544f7474638c;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 1cfed1d..f0004b2 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -716,11 +716,11 @@ redispatches your call to store_column to the superclass(es). You might have a class C which has many Cs. Further, you want to create a C object every time you insert an C object. -You can accomplish this by overriding C: +You can accomplish this by overriding C on your objects: sub insert { - my ( $class, $args_ref ) = @_; - my $self = $class->next::method($args_ref); + my ( $self, @args ) = @_; + $self->next::method(@args); $self->cds->new({})->fill_from_artist($self)->insert; return $self; }