GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CGI::DEURL::XS (3)

.ds Aq ’

NAME

CGI::Deurl::XS - Fast decoder for URL parameter strings

CONTENTS

SYNOPSIS



  use CGI::Deurl::XS parse_query_string;

  my $hash = parse_query_string(foo=bar&baz=quux&baz=qiix);
  # $hash = { foo => bar, baz => [quux, qiix] };



DESCRIPTION

This module decodes a URL-encoded parameter string in the manner of CGI.pm. However, as it uses C code from libapreq to perform the task, it’s somewhere from slightly to much faster (depending on your strings) than using CGI or a functionally similar module like CGI::Deurl.

FUNCTIONS

parse_query_string()


  $hash_ref = CGI::Deurl::XS::parse_query_string($query_string)



Parses the given query string. If the string is empty, returns undef. Otherwise returns a hash reference containing the key/value pairs encoded by the string. Empty values are returned as undef. If a parameter appears only once, it’s value in the hash is the scalar value of the encoded parameter value. If a parameter appears more than once, the hash value is an array reference containing each value given (with value order preserved). Obviously, parameter order is not preserved in the hash.

HTTP escapes (ASCII and Unicode) are decoded in both keys and values. The utf8 flag is not set on returned strings, nor are non-utf8 encodings decoded.

EXPORT

None by default, parse_query_string at request.

SEE ALSO

CGI

libapreq

AUTHOR

Adam Thomason, <athomason@sixapart.com>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Six Apart Ltd <cpan@sixapart.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 XS (3) 2014-12-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.