From 111fb5f38624401ac7f332dd8bf7fa65e7bf5b23 Mon Sep 17 00:00:00 2001 From: b Date: Tue, 26 Mar 2024 19:23:39 +0000 Subject: [PATCH] merge settings (imported from BSTA) --- botm_common.pm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/botm_common.pm b/botm_common.pm index cf9cf9e..5105ed6 100644 --- a/botm_common.pm +++ b/botm_common.pm @@ -27,7 +27,7 @@ use File::Copy; use Exporter; -our $VERSION = '1.1.6'; +our $VERSION = '1.1.7'; our @ISA = qw(Exporter); our @EXPORT = (); our @EXPORT_OK = ( @@ -48,7 +48,8 @@ our @EXPORT_OK = ( 'open_encoded', 'failpage', 'fail_method', 'fail_content_type', 'fail_open_file', 'fail_attachment', 'fail_500', - 'redirect' + 'redirect', + 'merge_settings' ); @@ -1308,6 +1309,21 @@ sub redirect } +#################### +## support tool ## +#################### + +sub merge_settings { + my %final_settings; + + foreach my $settings (@_) { + foreach my $ind (keys %$settings) { + $final_settings{$ind} = $settings->{$ind}; + } + } + return %final_settings; +} + ########### ## URL ## ########### -- 2.30.2