Monitoring::Plugin::ExitResult - Helper class for returning both output and
return codes when testing.
# In a test file somewhere
# Later ...
$e = plugin_exit( CRITICAL, 'aiiii ...' );
# MP::ExitResult also stringifies to the message output
like(plugin_exit( WARNING, 'foobar'), qr/^foo/, 'matches!');
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.
This code is maintained by the Monitoring Plugin Development Team: see
Gavin Carr , <firstname.lastname@example.org>
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.