From 3475d3b5ed65f6129bfd836eefb093200cbcdd71 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 9 May 2008 02:20:59 -0500 Subject: add 'list' command --- lib/App/Hiveminder/Command/List.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/App/Hiveminder/Command/List.pm diff --git a/lib/App/Hiveminder/Command/List.pm b/lib/App/Hiveminder/Command/List.pm new file mode 100644 index 0000000..337adf6 --- /dev/null +++ b/lib/App/Hiveminder/Command/List.pm @@ -0,0 +1,23 @@ +#!/usr/bin/perl +package App::Hiveminder::Command::List; +use Moose; +use App::Hiveminder::Utils qw/parse_args display_tasks/; +extends 'App::Hiveminder::Command'; + +=head2 NAME + +App::Hiveminder::Command::List - List tasks + +=cut + +sub command_names { qw/list ls/ } + +sub command { + my ($self, $args) = @_; + + return unless @_ > 0; + return display_tasks($self->hm, + $self->hm->get_tasks(%{ parse_args @$args })); +} + +1; -- cgit v1.2.3