Jifty::Request::Mapper - Maps response values into arbitrary query parameters
Jifty::Request::Mapper is used to insert values into parameters that you can't know when you originally constructed the request. The prime example of this is a Create action to a View page -- where you can't know what ID to supply to the View page until after the Create action has run. This problem can be fixed by establishing a mapping between some part of the Jifty::Result of the Create action, and the ID query parameter.
Jifty::Request::Mapper
Extended syntax for generating query parameters. This is used by Jifty::Web::Form::Clickable for its parameters argument, as well as for results of continuations.
parameters
results
Possible syntaxes for each key => value pair in the HASH are:
HASH
KEY => STRING
The simplest form -- the KEY will have the literal value of the STRING supplied
KEY
STRING
KEY => { result => ACTION }
The KEY will take on the value of the content named KEY from the result of the ACTION. ACTION may either be a Jifty::Action object, or a moniker thereof.
ACTION
KEY => { result => ACTION, name => STRING }
The KEY will take on the value of the content named STRING from the result of the ACTION. ACTION may either be a Jifty::Action object, or a moniker thereof.
KEY => { argument => ACTION }
The KEY will take on the value of the argument named KEY from the ACTION. ACTION may either be a Jifty::Action object, or a moniker thereof.
KEY => { argument => ACTION. name => STRING }
The KEY will take on the value of the argument named STRING from the ACTION. ACTION may either be a Jifty::Action object, or a moniker thereof.
result_of and argument_to are valid synonyms for result and argument, above.
result_of
argument_to
result
argument
Responsible for doing the actual mapping that "query_parameters" above sets up. That is, takes magical query parameters and extracts the values they were ment to have.
The key from a query parameter
key
The value of a query parameter
value
The Jifty::Request object to pull action arguments from. Defauts to the current request.
The Jifty::Response object to pull results from. Defaults to the current response.
Returns a key => value pair.
To install Jifty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty
CPAN shell
perl -MCPAN -e shell install Jifty
For more information on module installation, please visit the detailed CPAN module installation guide.