From 0d15600e99a9c7a01128440121302d428c4c82bc Mon Sep 17 00:00:00 2001 From: b Date: Mon, 9 Oct 2023 22:03:29 +0000 Subject: [PATCH] allow query as hash ref in merge_url() --- botm_common.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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'}; } -- 2.30.2