From: b Date: Mon, 9 Oct 2023 22:03:29 +0000 (+0000) Subject: allow query as hash ref in merge_url() X-Git-Tag: v1.0.23~1 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=0d15600e99a9c7a01128440121302d428c4c82bc;p=botm%2Fcommon-perl allow query as hash ref in merge_url() --- diff --git a/botm_common.pm b/botm_common.pm index 69d6cd9..1de622e 100644 --- a/botm_common.pm +++ b/botm_common.pm @@ -25,7 +25,7 @@ use Encode ('encode', 'decode'); use Exporter; -our $VERSION = '1.0.23'; +our $VERSION = '1.0.24'; our @ISA = qw(Exporter); our @EXPORT = (); our @EXPORT_OK = ( @@ -880,6 +880,9 @@ sub merge_url { if ($target_data{'append_query'}) { $final_data{'query'} = merge_url_query($target_data{'encoding'}, $final_data{'query'}, $target_data{'query'}); } + elsif (ref($target_data{'query'})) { + $final_data{'query'} = url_query_encode($target_data{'query'}, $target_data{'encoding'}); + } else { $final_data{'query'} = $target_data{'query'}; }