From 920afccc01238291df3b727014ab8a78faec07f2 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 9 May 2008 03:32:43 -0500 Subject: add a starts command --- lib/App/Hiveminder/Command/Starts.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/App/Hiveminder/Command/Starts.pm 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; -- cgit v1.2.3-54-g00ecf