X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FOrdered.pm;h=d5ebc55be8efb3752d9cf84b0523b98f16e5f57c;hb=1abccf54;hp=05da117f759dcc5db57ecf95b8374686442bd592;hpb=124162a0580d6007d51d85c5caf198a52a12989f;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Ordered.pm b/lib/DBIx/Class/Ordered.pm index 05da117..d5ebc55 100644 --- a/lib/DBIx/Class/Ordered.pm +++ b/lib/DBIx/Class/Ordered.pm @@ -581,19 +581,11 @@ sub delete { $self->move_last; - my @res; - if (not defined wantarray) { - $self->next::method( @_ ); - } - elsif (wantarray) { - @res = $self->next::method( @_ ); - } - else { - $res[0] = $self->next::method( @_ ); - } + $self->next::method( @_ ); $guard->commit; - return wantarray ? @res : $res[0]; + + return $self; } # add the current position/group to the things we track old values for