summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;