Net::ICAP::Response - ICAP Response Class
$Id: lib/Net/ICAP/Response.pm, 0.04 2017/04/12 15:54:19 acorliss Exp $
use Net::ICAP::Response; use Net::ICAP::Common qw(:resp); $msg = new Net::ICAP::Response; $rv = $msg->parse($fh); $method = $msg->status; $text = $msg->statusText; $msg = Net::ICAP::Response->new( status => ICAP_OK, headers => { ISTag => 'sasieEcjEO', }, ); $rv = $msg->status(ICAP_CONTINUE); $rv = $msg->generate($fh);
This module provides an ICAP Response class for parsing and generating ICAP responses. Additional methods available to this class are provided (and documented) in Net::ICAP::Message.
See Net::ICAP::Message documentation.
$rv = $msg->status($status); $status = $msg->method;
This method gets or sets the response status. Only valid statuses are accepted and must be one listed as a constant in Net::ICAP::Common. No provision exists at this moment to accept additional status codes.
$text = $msg->statusText; $text = $msg->statusText($code);
This method returns a text string describing the status code's purpose. IF no code is specified it returns the string associated with the internal status code currently set.
This method performs some basic sanity checks that the internal state has parsed, or can generate, a valid ICAP message. This includes checking for the presence of mandatory headers, but no validation is done on the accompanying values.
This method is used internally by both the parse and generate methods.
Arthur Corliss (corliss@digitalmages.com)
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information.
(c) 2012, Arthur Corliss (corliss@digitalmages.com)
To install Net::ICAP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::ICAP
CPAN shell
perl -MCPAN -e shell install Net::ICAP
For more information on module installation, please visit the detailed CPAN module installation guide.