diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-09 03:47:27 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-09 03:47:27 -0500 |
commit | f6769b717aa68fa9de205f86fd9ecdf07b0cdb32 (patch) | |
tree | 9aa98ab47837bd5d6761930d6db6902922b4a75e | |
parent | 27a449d8cf5a20025a978a95453aed19d25302cf (diff) | |
download | app-hiveminder-f6769b717aa68fa9de205f86fd9ecdf07b0cdb32.tar.gz app-hiveminder-f6769b717aa68fa9de205f86fd9ecdf07b0cdb32.zip |
add description
-rw-r--r-- | lib/App/Hiveminder/Command/Description.pm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/App/Hiveminder/Command/Description.pm b/lib/App/Hiveminder/Command/Description.pm new file mode 100644 index 0000000..1e20c5f --- /dev/null +++ b/lib/App/Hiveminder/Command/Description.pm @@ -0,0 +1,32 @@ +#!/usr/bin/perl +package App::Hiveminder::Command::Description; +use Moose; +use App::Hiveminder::Utils qw/parse_args display_tasks/; +extends 'App::Hiveminder::Command'; + +=head2 NAME + +App::Hiveminder::Command::Description - Get the description of tasks + +=cut + +sub command_names { qw/description get-description get_description/ } + +sub command { + my $self = shift; + + return unless @_ > 0; + my @tasks = $self->hm->get_tasks(%{ parse_args @_ }); + + my $ret = ''; + for my $task (@tasks) { + my $display = display_tasks($self->hm, $task); + $ret .= "Description for $display:\n"; + $ret .= $task->{description} . "\n" if $task->{description}; + } + + return $ret; +} + +__PACKAGE__->meta()->make_immutable(); +1; |