From 6de0f5fb0db777f89dc40984d9f173aee70e7d1a Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 29 Oct 2020 08:59:42 -0700 Subject: [PATCH] Girocco/Config.pm: require helpers instead of use Instead of "use"ing the helpers needed for config validation and setup, "require" them instead. This avoids polluting the namespace and only pulls them in at the point they are actually needed. Signed-off-by: Kyle J. McKay --- Girocco/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Girocco/Config.pm b/Girocco/Config.pm index 8dbe829..7787a07 100644 --- a/Girocco/Config.pm +++ b/Girocco/Config.pm @@ -1152,12 +1152,12 @@ our $git_daemon_host_list = undef; # Changing anything in this section can result in unexpected breakage # Couple of sanity checks and default settings (do not change these) -use Digest::MD5 qw(md5); -use MIME::Base64 qw(encode_base64); +require Digest::MD5; +require MIME::Base64; $name =~ s/\s+/_/gs; $nickname = lc((split(/[.]/, $name))[0]) unless $nickname; $nickname =~ s/\s+/_/gs; -our $tmpsuffix = substr(encode_base64(md5($name.':'.$nickname)),0,6); +our $tmpsuffix = substr(MIME::Base64::encode_base64(Digest::MD5::md5($name.':'.$nickname)),0,6); $tmpsuffix =~ tr,+/,=_,; ($mirror_user) or die "Girocco::Config: \$mirror_user must be set even if to current user"; ($basedir) or die "Girocco::Config: \$basedir must be set"; -- 2.11.4.GIT