NAME

Interchange6::Plugin::Interchange5::Request - Mimic Dancer::Request inside IC5

VERSION

Version 0.03

SYNOPSIS

Quick summary of what the module does.

In a tag (shipped as dancer_request.tag)

use Interchange6::Plugin::Interchange5::Request;
my %env = %{::http()->{env}};
return Interchange6::Plugin::Interchange5::Request->new(env => \%env);
...

Somewhere else

my $req = $Tag->dancer_request;
$req->header('Accept-Language');
$req->accept_language;
....

ACCESSORS

env

METHODS

environment($name)

Look into the environment variables, with the following routine: first, we uppercase the name and replace any non-alpha and non-digit character with the underscore. Then we look into the environment. If not found, we try to prepend HTTP_. Return undef in nothing is found.

header($name)

Alias for environment

SHORTCUTS

The following methods are just shortcuts for the environment method.

accept
accept_charset
accept_encoding
accept_language
accept_type
agent (alias for "user_agent")
connection
forwarded_for_address
forwarded_protocol
forwarded_host
host
keep_alive
path_info
referer
remote_address
user_agent

AUTHOR

Marco Pessotto, <melmothx at gmail.com>

BUGS

Please report any bugs or feature requests to bug-interchange6-plugin-autodetect at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Interchange6-Plugin-Autodetect. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Interchange6::Plugin::Interchange5::Request

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2013 Marco Pessotto.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.