summaryrefslogtreecommitdiffstats
path: root/lib/App/Hiveminder/Command/WillComplete.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/Hiveminder/Command/WillComplete.pm')
-rw-r--r--lib/App/Hiveminder/Command/WillComplete.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/App/Hiveminder/Command/WillComplete.pm b/lib/App/Hiveminder/Command/WillComplete.pm
new file mode 100644
index 0000000..3941827
--- /dev/null
+++ b/lib/App/Hiveminder/Command/WillComplete.pm
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+package App::Hiveminder::Command::WillComplete;
+use Moose;
+use App::Hiveminder::Utils qw/parse_args display_tasks update_tasks/;
+extends 'App::Hiveminder::Command';
+
+=head2 NAME
+
+App::Hiveminder::Command::WillComplete - Mark tasks as to be completed
+
+=cut
+
+sub command_names { qw/will-complete will_complete will-do will_do/ }
+
+sub command {
+ my $self = shift;
+
+ return unless @_ > 0;
+ return display_tasks($self->hm,
+ @{ update_tasks($self->hm, parse_args(@_),
+ sub { (will_complete => 1) }) });
+}
+
+__PACKAGE__->meta()->make_immutable();
+1;