summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-09 03:32:43 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-09 03:32:43 -0500
commit920afccc01238291df3b727014ab8a78faec07f2 (patch)
tree3a2e7848f396e8c16227d8b46d5b534a2defa994
parentf704d4ccaedf9573db851824020ad32067c1523a (diff)
downloadapp-hiveminder-920afccc01238291df3b727014ab8a78faec07f2.tar.gz
app-hiveminder-920afccc01238291df3b727014ab8a78faec07f2.zip
add a starts command
-rw-r--r--lib/App/Hiveminder/Command/Starts.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/App/Hiveminder/Command/Starts.pm b/lib/App/Hiveminder/Command/Starts.pm
new file mode 100644
index 0000000..40ce878
--- /dev/null
+++ b/lib/App/Hiveminder/Command/Starts.pm
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+package App::Hiveminder::Command::Starts;
+use Moose;
+use App::Hiveminder::Utils qw/parse_args display_tasks update_tasks/;
+extends 'App::Hiveminder::Command';
+
+=head2 NAME
+
+App::Hiveminder::Command::Starts - Hide tasks until a certain date
+
+=cut
+
+sub command_names { qw/starts/ }
+
+sub command {
+ my $self = shift;
+
+ return unless @_ > 1;
+ my $starts = pop;
+ return display_tasks($self->hm,
+ @{ update_tasks($self->hm, parse_args(@_),
+ sub { (starts => $starts) }) });
+}
+
+__PACKAGE__->meta()->make_immutable();
+1;