|
NAMEWWW::Form::UrlEncoded - parser and builder for application/x-www-form-urlencodedSYNOPSISuse WWW::Form::UrlEncoded qw/parse_urlencoded build_urlencoded/; my $query_string = "foo=bar&baz=param"; my @params = parse_urlencoded($query_string); # ('foo','bar','baz','param') my $query_string = build_urlencoded('foo','bar','baz','param'); # "foo=bar&baz=param"; DESCRIPTIONWWW::Form::UrlEncoded provides application/x-www-form-urlencoded parser and builder. This module aims to have compatibility with other CPAN modules like HTTP::Body's urlencoded parser.This module try to use WWW::Form::UrlEncoded::XS by default and fail to it, use WWW::Form::UrlEncoded::PP instead Parser rulesWWW::Form::UrlEncoded parsed string in this rule.
Test data'a=b&c=d' => ["a","b","c","d"] 'a=b;c=d' => ["a","b","c","d"] 'a=1&b=2;c=3' => ["a","1","b","2","c","3"] 'a==b&c==d' => ["a","=b","c","=d"] 'a=b& c=d' => ["a","b","c","d"] 'a=b; c=d' => ["a","b","c","d"] 'a=b; c =d' => ["a","b","c ","d"] 'a=b;c= d ' => ["a","b","c"," d "] 'a=b&+c=d' => ["a","b"," c","d"] 'a=b&+c+=d' => ["a","b"," c ","d"] 'a=b&c=+d+' => ["a","b","c"," d "] 'a=b&%20c=d' => ["a","b"," c","d"] 'a=b&%20c%20=d' => ["a","b"," c ","d"] 'a=b&c=%20d%20' => ["a","b","c"," d "] 'a&c=d' => ["a","","c","d"] 'a=b&=d' => ["a","b","","d"] 'a=b&=' => ["a","b","",""] '&' => ["","","",""] '=' => ["",""] '' => [] FUNCTION
ENVIRONMENT VALUE
SEE ALSOCPAN already has some application/x-www-form-urlencoded parser modules like these.
They does not fully compatible with WWW::Form::UrlEncoded. Handling of empty key-value and supporting separator characters are different. LICENSECopyright (C) Masahiro Nagano.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHORMasahiro Nagano <kazeburo@gmail.com>
Visit the GSP FreeBSD Man Page Interface. |