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  -  MONITORING::PLUGIN::EXITRESULT (3)

.ds Aq ’

NAME

Monitoring::Plugin::ExitResult - Helper class for returning both output and return codes when testing.

CONTENTS

SYNOPSIS



    use Test::More;
    use Monitoring::Plugin::Functions;

    # In a test file somewhere
    Monitoring::Plugin::Functions::_fake_exit(1);

    # Later ...
    $e = plugin_exit( CRITICAL, aiiii ... );
    print $e->message;
    print $e->return_code;

    # MP::ExitResult also stringifies to the message output
    like(plugin_exit( WARNING, foobar), qr/^foo/, matches!);



DESCRIPTION

Monitoring::Plugin::ExitResult is a tiny helper class intended for use when testing other Monitoring::Plugin modules. A Monitoring::Plugin::ExitResult object is returned by plugin_exit() and friends when Monitoring::Plugin::Functions::_fake_exit has been set, instead of doing a conventional print + exit.

AUTHOR

This code is maintained by the Monitoring Plugin Development Team: see https://monitoring-plugins.org

Originally:
Gavin Carr , <gavin@openfusion.com.au>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Monitoring Plugin Team Copyright (C) 2006-2014 by Nagios Plugin Development Team

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

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


perl v5.20.3 MONITORING::PLUGIN::EXITRESULT (3) 2014-01-20

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