blob: 8381daad59ad9fd469620ff740d086f1e26b944f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/usr/bin/perl
package App::Hiveminder::Command::Todo;
use Moose;
use App::Hiveminder::Utils qw/parse_args display_tasks/;
extends 'App::Hiveminder::Command';
=head2 NAME
App::Hiveminder::Command::Todo - Display the current todo list
=cut
sub command_names { qw/todo t/ }
sub command {
my $self = shift;
my %args = %{ parse_args @_ };
$args{complete_not} = 0 if exists $args{complete} &&
$args{complete} == 1 &&
!exists $args{complete_not};
$args{accepted_not} = 0 if exists $args{accepted} &&
$args{accepted} == 1 &&
!exists $args{accepted_not};
$args{owner} = '' if exists $args{owner_not} && $args{owner_not} ne '';
# XXX: fix for 'starts_before' and 'depends_on_count'
return display_tasks($self->hm, $self->hm->todo_tasks(%args));
}
1;
|