From 34dfb29e95d720038a74f36ed464b94a0ca589e3 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 9 May 2008 03:35:49 -0500 Subject: add will-complete --- lib/App/Hiveminder/Command/WillComplete.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/App/Hiveminder/Command/WillComplete.pm 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; -- cgit v1.2.3