From e4c672065b2c4a002ec51e79f5b561c1b81fa782 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 29 Oct 2020 05:15:39 -0700 Subject: [PATCH] Girocco/Config.pm: omit unwanted "our" undefs The wonderful parser picks up "our" declarations even if the code they are contained in does not actually execute. Simply move those assignments into an eval to avoid creation of the unwanted "our" variables in that case. Signed-off-by: Kyle J. McKay --- Girocco/Config.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Girocco/Config.pm b/Girocco/Config.pm index 00125f3..8a59c98 100644 --- a/Girocco/Config.pm +++ b/Girocco/Config.pm @@ -1247,13 +1247,13 @@ $reflogs_lifetime <= 30 or $reflogs_lifetime = 30; or die "Girocco::Config \$upload_pack_window must be in range 2..50"; (not defined $max_receive_size or $max_receive_size =~ /^\d+[kKmMgG]?$/) or die "Girocco::Config \$max_receive_size setting is invalid"; -defined($ENV{'SENDMAIL_PL_HOST'}) and our $sendmail_pl_host = $ENV{'SENDMAIL_PL_HOST'}; -defined($ENV{'SENDMAIL_PL_PORT'}) and our $sendmail_pl_port = $ENV{'SENDMAIL_PL_PORT'}; -defined($ENV{'SENDMAIL_PL_NCBIN'}) and our $sendmail_pl_ncbin = $ENV{'SENDMAIL_PL_NCBIN'}; -defined($ENV{'SENDMAIL_PL_NCOPT'}) and our $sendmail_pl_ncopt = $ENV{'SENDMAIL_PL_NCOPT'}; -defined($ENV{'PYTHON'}) and our $python = $ENV{'PYTHON'}; +defined($ENV{'SENDMAIL_PL_HOST'}) and eval 'our $sendmail_pl_host = $ENV{"SENDMAIL_PL_HOST"}'; +defined($ENV{'SENDMAIL_PL_PORT'}) and eval 'our $sendmail_pl_port = $ENV{"SENDMAIL_PL_PORT"}'; +defined($ENV{'SENDMAIL_PL_NCBIN'}) and eval 'our $sendmail_pl_ncbin = $ENV{"SENDMAIL_PL_NCBIN"}'; +defined($ENV{'SENDMAIL_PL_NCOPT'}) and eval 'our $sendmail_pl_ncopt = $ENV{"SENDMAIL_PL_NCOPT"}'; +defined($ENV{'PYTHON'}) and eval 'our $python = $ENV{"PYTHON"}'; my $op; BEGIN {$op = $ENV{'PATH'}} -defined($op) && defined($ENV{'PATH'}) && $op ne $ENV{'PATH'} and our $path=$ENV{'PATH'}; +defined($op) && defined($ENV{'PATH'}) && $op ne $ENV{'PATH'} and eval 'our $path=$ENV{"PATH"}'; # jailreporoot MUST NOT be absolute defined($jailreporoot) && substr($jailreporoot, 0, 1) ne "/" or -- 2.11.4.GIT