From 77e02c510dce9ae58af5d4c272a20ee816d6b1c5 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 9 May 2008 03:54:39 -0500 Subject: add comments --- lib/App/Hiveminder/Command/Comments.pm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/App/Hiveminder/Command/Comments.pm 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; -- cgit v1.2.3