Plack::Request::Mixin::URIWith
Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Plack/Request/Mixin
t
xt
.gitignore
.shipit
Changes
MANIFEST
MANIFEST.SKIP
Makefile.PL
README.mkdn

README.mkdn

NAME

Plack::Request::Mixin::URIWith - $req->uri_with() for Plack::Request.

SYNOPSIS

package My::Request;
use parent qw/Plack::Request Plack::Request::Mixin::URIWith/;

package main;

my $req = My::Request->new($env);
$req->uri_with({key => 'val'});

DESCRIPTION

Plack::Request::Mixin::URIWith is mixin library for Plack::Request.

This mixin provides uri rewriter.

$req->uri_with( { key => 'value' } );

Returns a rewritten URI object for the current request. Key/value pairs passed in will override existing parameters. You can remove an existing parameter by passing in an undef value. Unmodified pairs will be preserved.

You may also pass an optional second parameter that puts uri_with into append mode:

$req->uri_with( { key => 'value' }, { mode => 'append' } );

AUTHOR

Tokuhiro Matsuno

SEE ALSO

some part of the code was taken from Catalyst.

THANKS TO

Catalyst committers.

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

some part of code/document is taken from Catalyst.