Nagios::Plugin::OverHTTP::Response - Represents a parsed reponse from the HTTP


Nagios-Plugin-OverHTTP documentation Contained in the Nagios-Plugin-OverHTTP distribution.

Index


Code Index:

NAME

Top

Nagios::Plugin::OverHTTP::Response - Represents a parsed reponse from the HTTP server

VERSION

Top

This documentation refers to Nagios::Plugin::OverHTTP::Response version 0.14

SYNOPSIS

Top

  #TODO: Write this

DESCRIPTION

Top

This module represents a parsed response from the HTTP server with additional methods related to the operation of Nagios::Plugin::OverHTTP.

ATTRIBUTES

Top

message

Required. This is the message (i.e. plugin output) from the plugin that was parsed.

performance_data

This is a string that represents the performance data from the plugin.

response

Required. This is the HTTP::Response object to parse.

status

Required. This is the status from the remote plugin.

METHODS

Top

has_performance_data

This will return a Boolean of true if the response had any performance_data and false otherwise.

DEPENDENCIES

Top

This module is dependent on the following modules:

* Moose 0.74
* MooseX::Clone 0.05
* MooseX::StrictConstructor 0.08
* Nagios::Plugin::OverHTTP::Library
* namespace::clean 0.04

AUTHOR

Top

Douglas Christopher Wilson, <doug at somethingdoug.com>

BUGS AND LIMITATIONS

Top

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.

LICENSE AND COPYRIGHT

Top


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__