The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::HabitRPG::Task - A HabitRPG task

VERSION

version 0.30

SYNOPSIS

    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;

DESCRIPTION

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).

METHODS

active_today()

    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 >.

format_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.

AUTHOR

Paul Fenwick <pjf@cpan.org>

COPYRIGHT AND LICENSE

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.