Maypole::Headers - Convenience wrapper around HTTP::Headers
use Maypole::Headers; $r->headers_out(Maypole::Headers->new); # Note, automatic in Maypole $r->headers_out->set('Content-Base' => 'http://localhost/maypole'); $r->headers_out->push('Set-Cookie' => $cookie->as_string); $r->headers_out->push('Set-Cookie' => $cookie2->as_string); print $r->headers_out->as_string;
A convenience wrapper around HTTP::Headers. Additional methods are provided to make the mutators less repetitive and wordy. For example:
HTTP::Headers
$r->headers_out->header(Content_Base => $r->config->uri_base);
can be written as:
$r->headers_out->set(Content_Base => $r->config->uri_base);
All the standard HTTP::Headers methods, plus the following:
Get the value of a header field.
An alias to HTTP::Headers->header
HTTP::Headers->header
gt
Set the value of one or more header fields
Add a value to the field named $header. Previous values are maintained.
$header
An alias to HTTP::Headers->push_header
HTTP::Headers->push_header
Alias to push - useful for Apache::Session::Wrapper support, in CGI mode.
push
Apache::Session::Wrapper
Set the value for the field named $header, but only if that header is currently undefined.
An alias to HTTP::Headers->init_header
HTTP::Headers->init_header
Remove one of more headers
An alias to HTTP::Headers->remove_header
HTTP::Headers->remove_header
Returns a list of distinct header names
An alias to HTTP::Headers->header_field_names
HTTP::Headers->header_field_names
Simon Flack
To install Maypole, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Maypole
CPAN shell
perl -MCPAN -e shell install Maypole
For more information on module installation, please visit the detailed CPAN module installation guide.