Next: Text::Wigwam::Modules::Core::Html | Previous: Text::Wigwam::Library::Time | [Table of Contents] | [Text::Wigwam Index] |
Text::Wigwam::Modules::Core::Cgi #cgi::encode, #cgi::decode, #cgi::post, #cgi::env, #cgi::get_query, #cgi::parse_query, #cgi::make_query #cgi::parse_cookies #cgi::make_cookies
This module contains directives useful for accessing CGI environment variables, and managing query strings and other forms of web encoded data.
Retrieves a URI encoded query string via the POST method and returns a hash complex containing the decoded data.
Retrieves a URI encoded query string based upon the relevant GET or POST method and returns a hash complex containing the decoded data.
Returns a reference to Perl's %ENV hash.
Parses the URI encoded string and returns a reference to a hash reference containing the decoded data.
[!! #define Query #cgi::parse_query "name.first=Fred&name.last=Mertz" !!] First name: [!! Query.name.first !!], Last name: [!! Query.name.last !!] [!! /* output: First name: Fred, Last name: Mertz */ !!]
Performs the reverse of #cgi::parse_query
. Returns a URI encoded string
generated from hash.
[!! #cgi::make_query %< one "single" two "twice that of one" three "more than you need" > /* output (order will vary): three=more+than+you+need&one=single&two=twice+that+of+one */ !!]
Returns a reference to a hash complex containing decoded data generated from encoded http_cookies data.
[!! #define cookies #cgi::parse_cookies "foo.bar=bazz; bar.foo=quux" !!] foo.bar = [!! cookies.foo.bar !!] bar.foo = [!! cookies.bar.foo !!] [!! /* output: foo.bar = bazz bar.foo = quux */ !!]
Performs the reverse of #cgi::parse_cookies
- returns an encoded string
generated from hash which is suitable for use as an http-cookie.
[!! #cgi::make_cookies %< one "single" two "twice that of one" three "more than you need" > /* output (order will vary): three=more+than+you+need; one=single; two=twice+that+of+one */ !!]
Returns a URI encoded version of string.
[!! #cgi::encode "Four score & seven years ago" /* output: Four+score+&+seven+years+ago */ !!]
Returns a URI decoded version of string.
[!! #cgi::decode "Four+score+&+seven+years+ago" /* output: Four score & seven years ago */ !!]