X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FInterfaceModel%2FAction%2FDBIC%2FResult%2FDelete.pm;h=3f4e81815aceebea315d0810babfc5da2904ca67;hb=7460b54490d1906c19559e37befa13fee7919227;hp=4d81486b43fb7e349f0b1b006658b518f579b9ce;hpb=d9a3266fb7015bb1211171c1c113df3b1b7cd700;p=catagits%2FReaction.git diff --git a/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm b/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm index 4d81486..3f4e818 100644 --- a/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm +++ b/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm @@ -1,19 +1,18 @@ package Reaction::InterfaceModel::Action::DBIC::Result::Delete; +use aliased 'Reaction::InterfaceModel::Action::DBIC::Result'; +use aliased 'Reaction::InterfaceModel::Action::Role::SimpleMethodCall'; use Reaction::Types::DBIC 'Row'; use Reaction::Class; -class Delete is 'Reaction::InterfaceModel::Action', which { - has '+target_model' => (isa => Row); +use namespace::clean -except => [ qw(meta) ]; +extends Result; - sub can_apply { 1 } +with SimpleMethodCall; +sub _target_model_method { 'delete' }; - implements do_apply => as { - my $self = shift; - return $self->target_model->delete; - }; +__PACKAGE__->meta->make_immutable; -}; 1;