Ubic::Cmd::Results - console results set
use Ubic::Cmd::Results; $results = Ubic::Cmd::Results->new; $results->print($result); $results->print($result, 'bad'); $results->print($result, 'good'); $code = $results->finish; # prints final statistics and returns supposed exit code
This class controls output of service actions.
Constructor.
Print given strings in red color if stdout is terminal, and in plain text otherwise.
Print given strings in green color if stdout is terminal, and in plain text otherwise.
Print given Ubic::Result::Class object.
Ubic::Result::Class
$type can be "good" or "bad".
$type
If $type is specified, it is taken into consideration, otherwise result is considered good unless it is "broken".
Add result without printing.
Get all results.
Print error if some of results are bad, and return correct exit code, understandable by _run_impl().
_run_impl()
Vyacheslav Matjukhin <mmcleric@yandex-team.ru>
To install Ubic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ubic
CPAN shell
perl -MCPAN -e shell install Ubic
For more information on module installation, please visit the detailed CPAN module installation guide.