Ubic::Cmd::Results - console results set
version 1.40
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.
Get exit code appropriate for results.
It can be detected dynamically based on results content, or set explicitly from Ubic::Cmd, depending on command.
Ubic::Cmd
Set exit code explicitly.
Print error if some of results are bad, and return exit code.
Vyacheslav Matyukhin <mmcleric@yandex-team.ru>
This software is copyright (c) 2012 by Yandex LLC.
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 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.