App::HWD::Task - Tasks for HWD
Used only by the hwd application.
Note that these functions are pretty fragile, and do almost no data checking.
Returns an App::HWD::Task object from an input line
Creates a new task from the args passed in. They should include at least level, name and id, even if id is undef.
undef
my $task = App::HWD::Task->new( { level => $level, name => $name, id => $id, estimate => $estimate, } );
Returns the level of the task
Returns the name of the task
Returns the ID of the task, or the empty string if there isn't one.
Returns a string describing the location of the task's line, as in "line 45 of foo.hwd"
Returns the estimate, or 0 if it's not set.
Returns the list of notes for the task.
Returns a string showing the date the task was added, or empty string if it's not set.
Returns a DateTime object representing the date the task was added, or undef if it's not set.
Returns a string showing the date the task was deleted, or empty string if it's not set.
Returns a DateTime object representing the date the task was deleted, or undef if it's not set.
Returns the parent of the task, or undef if it's a top-level task.
Returns a list of child tasks.
Returns the array of App::HWD::Work applied to the task.
Returns true if the task still has things to be done on it. If the task has no estimates, because it's a roll-up or milestone task, this is false.
Sets the $key field to $value.
Adds the lines passed in to the notes lines for the task.
Adds a child Task record to the task
Adds a Work record to the task, for later accumulating
Returns the number of hours worked, but counting up all the work records added in "add_work".
Returns whether the task has been started. Doesn't address the question of whether the task is completed or not, just whether work has been done on it.
Returns whether the task has been completed.
Returns a simple one line description of the Work.
Make sure all the work for a task is sorted so we can tell what was done when.
Recursively walks the tree of subtasks for the task, calling $callback for each subtask, like so:
$callback
$callback->( $subtask )
Andy Lester, <andy at petdance.com>
<andy at petdance.com>
Copyright 2006 Andy Lester, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::HWD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::HWD
CPAN shell
perl -MCPAN -e shell install App::HWD
For more information on module installation, please visit the detailed CPAN module installation guide.