The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

URI::URL::AddQueryParam - Add Query Param after HTTP URL

SYNOPSIS

  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'

DESCRIPTION

avoid '&/?' things.

EXPORT

None by default.

SEE ALSO

URI::QueryParam

AUTHOR

Chen Gang, <yikuyiku.com@gmail.com<gt>

COPYRIGHT AND LICENSE

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.