summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-09 03:35:49 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-09 03:35:49 -0500
commit34dfb29e95d720038a74f36ed464b94a0ca589e3 (patch)
tree9a057e83ef8fabca10149c4972e264d761725ea4
parent920afccc01238291df3b727014ab8a78faec07f2 (diff)
downloadapp-hiveminder-34dfb29e95d720038a74f36ed464b94a0ca589e3.tar.gz
app-hiveminder-34dfb29e95d720038a74f36ed464b94a0ca589e3.zip
add will-complete
-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;