WebService::HabitRPG::Task - A HabitRPG task
version 0.21
my $task = WebService::HabitRRG::Task->new( text => 'Floss teeth', id => 'a670fc50-4e04-4b0f-9583-e4ee55fced02', up => 1, down => 0, value => 0, type => 'habit', tags => { work_uuid => 1, home_uuid => 0 }, ); say "Task name: ", $task->text;
Represents a HabitRPG task object. All properties shown in the synopsis are checked for sanity and are available as methods.
The history, completed and repeat attributes may also be provided at build-time, but are optional. No checking is done on them (yet).
history
completed
repeat
if ( $task->active_today ) { # This task is active today! }
Returns a true value if this task is due today. To check if it's already completed, check $task-completed >.
$task-
say $task->format_task;
Generated a formatted form of the task, including check-boxes for todo and daily tasks, and + and - signs for habits.
todo
daily
+
-
Paul Fenwick <pjf@cpan.org>
This software is copyright (c) 2013 by Paul Fenwick.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::HabitRPG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::HabitRPG
CPAN shell
perl -MCPAN -e shell install WebService::HabitRPG
For more information on module installation, please visit the detailed CPAN module installation guide.