PEF::Front::Headers - Base headers class
PEF::Front::HTTPHeaders - Class encapsulating HTTP Message headers
my $basic = $context->{headers}->get_header('basic');
Usually you can get instance of these classes from context: $headers has type PEF::Front::HTTPHeaders. These are also used in PEF::Front::Response for cookies and headers.
context
$headers
PEF::Front::HTTPHeaders
The only difference between PEF::Front::Headers and PEF::Front::HTTPHeaders is that HTTPHeaders can convert "CONTENT-TYPE" or "content_type" type of header names to canonical "Content-Type".
PEF::Front::Headers
Constructor. Can set headers and copy from existing PEF::Front::Headers or derived instances.
my $h = PEF::Front::Headers->new($header => $value); my $h2 = PEF::Front::Headers->new($header1 => $value1, $header2 => $value2, ...); my $h3 = PEF::Front::Headers->new($h, $h2);
Adds header. This method allows to have multiple headers with the same name.
Sets header. This method ensures that there's only one header with given name in response.
Removes header.
Returns header. In case of multiple headers with the same name it returns array of them.
This module was written and is maintained by Anton Petrusevich.
Copyright (c) 2016 Anton Petrusevich. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install PEF::Front, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PEF::Front
CPAN shell
perl -MCPAN -e shell install PEF::Front
For more information on module installation, please visit the detailed CPAN module installation guide.