summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-09 03:44:38 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-09 03:44:38 -0500
commit27a449d8cf5a20025a978a95453aed19d25302cf (patch)
tree7ef3f8a53609ec6c35dbc12aca03b7f2a1a3ef0b
parent74d577e7015aea1b4ceb1f83aab54c29d1924b0b (diff)
downloadapp-hiveminder-27a449d8cf5a20025a978a95453aed19d25302cf.tar.gz
app-hiveminder-27a449d8cf5a20025a978a95453aed19d25302cf.zip
add give
-rw-r--r--lib/App/Hiveminder/Command/Give.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/App/Hiveminder/Command/Give.pm b/lib/App/Hiveminder/Command/Give.pm
new file mode 100644
index 0000000..52810a1
--- /dev/null
+++ b/lib/App/Hiveminder/Command/Give.pm
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+package App::Hiveminder::Command::Give;
+use Moose;
+use App::Hiveminder::Utils qw/parse_args display_tasks update_tasks/;
+extends 'App::Hiveminder::Command';
+
+=head2 NAME
+
+App::Hiveminder::Command::Give - Offer tasks to other people
+
+=cut
+
+sub command_names { qw/give offer/ }
+
+sub command {
+ my $self = shift;
+
+ return unless @_ > 1;
+ my $email = pop;
+ return display_tasks($self->hm,
+ @{ update_tasks($self->hm, parse_args(@_),
+ sub { (owner_id => $email) }) });
+}
+
+__PACKAGE__->meta()->make_immutable();
+1;