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
Nagios::Plugin::ExitResult(3) User Contributed Perl Documentation Nagios::Plugin::ExitResult(3)

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

    use Test::More;
    use Nagios::Plugin::Functions;

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

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

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

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

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

Copyright (C) 2006 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.

2010-12-03 perl v5.32.1

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

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