GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  UBIC::CMD::RESULTS (3)

.ds Aq ’

NAME

Ubic::Cmd::Results - console results set

CONTENTS

VERSION

version 1.58

SYNOPSIS



    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



DESCRIPTION

This class controls the output of service actions.

INTERFACE SUPPORT

This is considered to be a non-public class. Its interface is subject to change without notice.

METHODS

<B>B>new()<B>B> Constructor.
<B>print_bad(@strings)B> Print given strings in red color if stdout is terminal, and in plain text otherwise.
<B>print_good(@strings)B> Print given strings in green color if stdout is terminal, and in plain text otherwise.
<B>print($result)B>
<B>print($result, B>$type<B>)B> Print given Ubic::Result::Class object.

$type can be good or bad.

If $type is specified, it is taken into consideration, otherwise result is considered good unless it is broken.

<B>add($result)B> Add result without printing.
<B>B>results()<B>B> Get all results.
<B>B>exit_code()<B>B> Get exit code appropriate for results.

It can be detected dynamically based on results content, or set explicitly from Ubic::Cmd, depending on command.

<B>exit_code($code)B> Set exit code explicitly.
<B>finish(\@results)B> Print error if some of results are bad, and return exit code.

AUTHOR

Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 UBIC::CMD::RESULTS (3) 2015-01-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.