From cc25fa2b3207b1b1034a2a5300a85df7a848530d Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 14 Jan 2025 21:05:54 -0800 Subject: [PATCH] Use formal params --- web-lib-funcs.pl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index cd83a0324..3fdef1832 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -10233,12 +10233,9 @@ file, which defaults to the current module. =cut sub save_module_config { -my $c = $_[0] || { &get_module_variable('%config') }; -my $m; -if (defined($_[1])) { - $m = $_[1]; - } -else { +my ($c, $m) = @_; +$c ||= { &get_module_variable('%config') }; +if (!defined($m)) { $m = &get_module_name(); $m || &error("could not compute current module in save_module_config"); }