aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm')
-rw-r--r--lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm b/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm
new file mode 100644
index 0000000..68bd365
--- /dev/null
+++ b/lib/Reaction/InterfaceModel/Action/DBIC/Result/Delete.pm
@@ -0,0 +1,36 @@
+package Reaction::InterfaceModel::Action::DBIC::Result::Delete;
+
+use Reaction::Types::DBIC;
+use Reaction::Class;
+
+class Delete is 'Reaction::InterfaceModel::Action', which {
+ has '+target_model' => (isa => 'DBIx::Class::Row');
+
+ sub can_apply { 1 }
+
+ implements do_apply => as {
+ my $self = shift;
+ return $self->target_model->delete;
+ };
+
+};
+
+1;
+
+=head1 NAME
+
+Reaction::InterfaceModel::Action::DBIC::Result::Delete
+
+=head1 DESCRIPTION
+
+=head2 target_model
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
+
+=cut