Nagios::Plugin::OverHTTP::Middleware - Moose role for response middleware


Nagios-Plugin-OverHTTP documentation  | view source Contained in the Nagios-Plugin-OverHTTP distribution.

Index


NAME

Top

Nagios::Plugin::OverHTTP::Middleware - Moose role for response middleware

VERSION

Top

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

SYNOPSIS

Top

  package My::Custom::Middleware;

  use Moose;

  with 'Nagios::Plugin::OverHTTP::Middleware'; # use the role (required)

  sub rewrite {
      my ($self, $response) = @_;

      # Do something with $response
      my $new_response = $response->clone( ... );

      return $new_response;
  };

  no Moose; # unimport Moose

  1;

DESCRIPTION

Top

This module is a Moose role that defines the required API for middleware.

REQUIRED METHODS

Top

rewrite

This must return a new instance of Nagios::Plugin::OverHTTP::Response. This will be called as a method with a single argument being a Nagios::Plugin::OverHTTP::Response object. For the most part this object has read only attributes, and thus a new object needs to be returned.

  $response = $middleware->rewrite($response);

METHODS

Top

This module has no methods.

DEPENDENCIES

Top

This module is dependent on the following modules:

* Moose::Role 0.74
* 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  | view source Contained in the Nagios-Plugin-OverHTTP distribution.