URL::Encode - Encoding and decoding of application/x-www-form-urlencoded encoding.
application/x-www-form-urlencoded
$octets = url_decode($octets); $string = url_decode_utf8($octets); $octets = url_encode($octets); $octets = url_encode_utf8($string); url_params_each($octets, $callback [, $utf8 = false]); $params = url_params_flat($octets [, $utf8 = false]); $params = url_params_mixed($octets [, $utf8 = false]); $params = url_params_multi($octets [, $utf8 = false]);
This module provides functions to encode and decode strings into and from the application/x-www-form-urlencoded encoding.
Decodes a urlencoded octet string.
Usage
$octets = url_decode($octets);
Decodes a urlencoded octet string using the UTF-8 encoding scheme.
$string = url_decode_utf8($octets);
Encodes an octet string into a urlencoded encoding.
$octets = url_encode($octets);
Encodes a character string into a urlencoded encoding using the UTF-8 encoding scheme.
$octets = url_encode($string);
Decodes a urlencoded data set invoking a callback for each name/value pair.
$callback = sub { my ($name, $value) = @_; }; url_params_each($octets, $callback); url_params_each($octets, $callback, $utf8);
Decodes a urlencoded data set into an ARRAY reference like:
ARRAY
[ "name", "value", "name", "value" ]
$array = url_params_flat($octets); $array = url_params_flat($octets, $utf8);
Decodes a urlencoded data set into a HASH reference like:
HASH
{ name => "value", name => [ "value", "value" ] }
$hash = url_params_mixed($octets); $hash = url_params_mixed($octets, $utf8);
{ name => [ "value" ], name => [ "value", "value" ] }
$hash = url_params_multi($octets); $hash = url_params_multi($octets, $utf8);
None by default. All functions can be exported using the :all tag or individually.
:all
Subroutine called with wrong number of arguments.
XS implementation of URL::Encode.
URL::Encode
Please report any bugs or feature requests to bug-url-encode@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=URL-Encode
bug-url-encode@rt.cpan.org
Christian Hansen chansen@cpan.org
chansen@cpan.org
Copyright 2011 by Christian Hansen.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install URL::Encode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URL::Encode
CPAN shell
perl -MCPAN -e shell install URL::Encode
For more information on module installation, please visit the detailed CPAN module installation guide.