[Bps-public-commit] r12126 - in Net-Hiveminder: lib/Net
sartak at bestpractical.com
sartak at bestpractical.com
Wed May 7 03:11:06 EDT 2008
Author: sartak
Date: Wed May 7 03:11:04 2008
New Revision: 12126
Modified:
Net-Hiveminder/ (props changed)
Net-Hiveminder/Changes
Net-Hiveminder/lib/Net/Hiveminder.pm
Log:
r55167 at onn: sartak | 2008-05-07 03:10:56 -0400
Allow passing arguments from todo to display_tasks
Modified: Net-Hiveminder/Changes
==============================================================================
--- Net-Hiveminder/Changes (original)
+++ Net-Hiveminder/Changes Wed May 7 03:11:04 2008
@@ -3,6 +3,7 @@
0.06
Add a "color" option to display_tasks; color the record locator by
priority
+ Allow passing arguments from todo to display_tasks
0.05 Mon Mar 17 08 13:22:32
todo, create_task and braindump now use filters so you can have .hm
Modified: Net-Hiveminder/lib/Net/Hiveminder.pm
==============================================================================
--- Net-Hiveminder/lib/Net/Hiveminder.pm (original)
+++ Net-Hiveminder/lib/Net/Hiveminder.pm Wed May 7 03:11:04 2008
@@ -220,12 +220,21 @@
In scalar context it will return the concatenation of the tasks.
+If the first argument is an array reference, it will be passed to
+L</display_tasks> as options.
+
+For example, to display tasks due today (with color):
+
+ print scalar $hm->todo([color => 1], due => "today");
+
=cut
sub todo {
my $self = shift;
+ my $opts = [];
+ $opts = shift if ref($_[0]) eq 'ARRAY';
- $self->display_tasks( $self->todo_tasks(@_) );
+ $self->display_tasks( $opts, $self->todo_tasks(@_) );
}
=head2 create_task SUMMARY, ARGS
More information about the Bps-public-commit
mailing list