diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-09 03:35:49 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-09 03:35:49 -0500 |
commit | 34dfb29e95d720038a74f36ed464b94a0ca589e3 (patch) | |
tree | 9a057e83ef8fabca10149c4972e264d761725ea4 /lib/App/Hiveminder/Command | |
parent | 920afccc01238291df3b727014ab8a78faec07f2 (diff) | |
download | app-hiveminder-34dfb29e95d720038a74f36ed464b94a0ca589e3.tar.gz app-hiveminder-34dfb29e95d720038a74f36ed464b94a0ca589e3.zip |
add will-complete
Diffstat (limited to 'lib/App/Hiveminder/Command')
-rw-r--r-- | lib/App/Hiveminder/Command/WillComplete.pm | 25 |
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; |