URI::URL::AddQueryParam - Add Query Param after HTTP URL
use strict; use warnings; use URI::URL::AddQueryParam qw(http_add_query_param); my %http_param = ('ta' => 'ok', 'foobar' => 1, 'hoge' => 0); my $base_url = 'http://example.com/'; print http_add_query_param($base_url, \%http_param); # got 'http://example.com/?ta=ok&hoge=0&foobar=1' %http_param = ('ta' => 'ok', 'foobar' => 1, 'hoge' => 0); $base_url = 'http://example.com?soso=gogo'; print http_add_query_param($base_url, \%http_param); # got 'http://example.com/tt3.php?soso=gogo&ta=ok&hoge=0&foobar=1'
avoid '&/?' things.
None by default.
URI::QueryParam
Chen Gang, <yikuyiku.com@gmail.com<gt>
Copyright (C) 2014 by Chen Gang
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16.2 or, at your option, any later version of Perl 5 you may have available.
To install URI::URL::AddQueryParam, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI::URL::AddQueryParam
CPAN shell
perl -MCPAN -e shell install URI::URL::AddQueryParam
For more information on module installation, please visit the detailed CPAN module installation guide.