NAME
CGI::Header::PSGI - Mixin to generate PSGI response headers
SYNOPSIS
use parent 'CGI';
use CGI::Header::PSGI qw( psgi_header psgi_redirect );
sub crlf { $CGI::CRLF }
DESCRIPTION
This module is a mixin class to generate PSGI response headers.
REQUIRED METHODS
Your class has to implement the following methods.
- $query->charset
-
Returns the character set sent to the browser.
- $query->self_url
- $query->cache
- $query->crlf
-
Returns the system specific line ending sequence.
METHODS
By using this module, your class is capable of following methods.
- ($status_code, $headers_aref) = $query->psgi_header( %args )
-
Works like CGI.pm's
header()
, but the return format is modified. It returns an array with the status code and arrayref of header pairs that PSGI requires. - ($status_code, $headers_aref) = $query->psgi_redirect( %args )
-
Works like CGI.pm's
redirect()
, but the return format is modified. It returns an array with the status code and arrayref of header pairs that PSGI requires.
SEE ALSO
CGI::PSGI, CGI::Emulate::PSGI, CGI::Simple
AUTHOR
Ryo Anazawa (anazawa@cpan.org)
LICENSE
This module is free software; you can redistibute it and/or modify it under the same terms as Perl itself. See perlartistic.