diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-09 03:54:39 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-09 03:54:39 -0500 |
commit | 77e02c510dce9ae58af5d4c272a20ee816d6b1c5 (patch) | |
tree | 2de558e29efa3f2fa9b80707c72c5be18f539867 | |
parent | 616f255619183f3ae987c2c98b0413177ae1ec8b (diff) | |
download | app-hiveminder-77e02c510dce9ae58af5d4c272a20ee816d6b1c5.tar.gz app-hiveminder-77e02c510dce9ae58af5d4c272a20ee816d6b1c5.zip |
add comments
-rw-r--r-- | lib/App/Hiveminder/Command/Comments.pm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/App/Hiveminder/Command/Comments.pm b/lib/App/Hiveminder/Command/Comments.pm new file mode 100644 index 0000000..3cfe9b4 --- /dev/null +++ b/lib/App/Hiveminder/Command/Comments.pm @@ -0,0 +1,30 @@ +#!/usr/bin/perl +package App::Hiveminder::Command::Comments; +use Moose; +use App::Hiveminder::Utils qw/parse_args display_tasks/; +extends 'App::Hiveminder::Command'; + +=head2 NAME + +App::Hiveminder::Command::Comments - Display the comments on tasks + +=cut + +sub command_names { qw/comments get-comments get_comments/ } + +sub command { + my $self = shift; + + return unless @_ > 0; + my $ret; + my @tasks = $self->hm->get_tasks(%{ parse_args @_ }); + for my $task (@tasks) { + my $desc = display_tasks($self->hm, $task); + $ret .= "Comments for: $desc\n"; + $ret .= join "\n", ($self->hm->comments_on($task)); + } + return $ret; +} + +__PACKAGE__->meta()->make_immutable(); +1; |