| Nagios-Plugin-OverHTTP documentation | Contained in the Nagios-Plugin-OverHTTP distribution. |
Nagios::Plugin::OverHTTP::Response - Represents a parsed reponse from the HTTP server
This documentation refers to Nagios::Plugin::OverHTTP::Response version 0.14
#TODO: Write this
This module represents a parsed response from the HTTP server with additional methods related to the operation of Nagios::Plugin::OverHTTP.
Required. This is the message (i.e. plugin output) from the plugin that was parsed.
This is a string that represents the performance data from the plugin.
Required. This is the HTTP::Response object to parse.
Required. This is the status from the remote plugin.
This will return a Boolean of true if the response had any performance_data and false otherwise.
This module is dependent on the following modules:
Douglas Christopher Wilson, <doug at somethingdoug.com>
Please report any bugs or feature requests to
bug-nagios-plugin-overhttp at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Nagios-Plugin-OverHTTP. I
will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
Copyright 2010 Douglas Christopher Wilson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of either:
| Nagios-Plugin-OverHTTP documentation | Contained in the Nagios-Plugin-OverHTTP distribution. |
package Nagios::Plugin::OverHTTP::Response; use 5.008001; use strict; use warnings 'all'; ########################################################################### # METADATA our $AUTHORITY = 'cpan:DOUGDUDE'; our $VERSION = '0.14'; ########################################################################### # MOOSE use Moose 0.74; use MooseX::StrictConstructor 0.08; ########################################################################### # MOOSE ROLES with 'MooseX::Clone'; ########################################################################### # MOOSE TYPES use Nagios::Plugin::OverHTTP::Library qw(Status); ########################################################################### # ALL IMPORTS BEFORE THIS WILL BE ERASED use namespace::clean 0.04 -except => [qw(meta)]; ########################################################################### # ATTRIBUTES has 'message' => ( is => 'ro', isa => 'Str', required => 1, ); has 'performance_data' => ( is => 'ro', isa => 'Str', clearer => '_clear_performance_data', predicate => 'has_performance_data', ); has 'response' => ( is => 'ro', isa => 'HTTP::Response', required => 1, traits => [qw/Clone/], ); has 'status' => ( is => 'ro', isa => Status, coerce => 1, required => 1, ); ########################################################################### # MAKE MOOSE OBJECT IMMUTABLE __PACKAGE__->meta->make_immutable; 1; __END__