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

NAME

Ubic::Result::Class - ubic result object

VERSION

version 1.10

SYNOPSIS

    use Ubic::Result qw(result);

    my $result = result("already running");
    print $result->status; # running
    print "$result"; # already running

DESCRIPTION

Many service actions can *do* something and *result* in something.

This class encapsulates both in one handy object.

STATUSES

Possible statuses:

running
not running
broken
down

ACTIONS

Actions are something that was done which resulted in current status by invoked method.

Possible actions:

started
stopped
none
reloaded

METHODS

new({ type => $type, msg => $msg })

Constructor.

status()

Get status, see above for possible values.

action()

Get action.

as_string()

Get string representation.

SEE ALSO

Ubic::Result - service action's result.

AUTHOR

Vyacheslav Matjukhin <mmcleric@yandex-team.ru>