From 757530180c7bc30fd0e7a5ffa1895a4459643fad Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 9 May 2008 03:37:44 -0500 Subject: add wont-complete --- lib/App/Hiveminder/Command/WontComplete.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/App/Hiveminder/Command/WontComplete.pm diff --git a/lib/App/Hiveminder/Command/WontComplete.pm b/lib/App/Hiveminder/Command/WontComplete.pm new file mode 100644 index 0000000..0790eb0 --- /dev/null +++ b/lib/App/Hiveminder/Command/WontComplete.pm @@ -0,0 +1,25 @@ +#!/usr/bin/perl +package App::Hiveminder::Command::WontComplete; +use Moose; +use App::Hiveminder::Utils qw/parse_args display_tasks update_tasks/; +extends 'App::Hiveminder::Command'; + +=head2 NAME + +App::Hiveminder::Command::WontComplete - Mark tasks as to never be completed + +=cut + +sub command_names { qw/wont-complete wont_complete wont-do wont_do/ } + +sub command { + my $self = shift; + + return unless @_ > 0; + return display_tasks($self->hm, + @{ update_tasks($self->hm, parse_args(@_), + sub { (will_complete => 0) }) }); +} + +__PACKAGE__->meta()->make_immutable(); +1; -- cgit v1.2.3-54-g00ecf