This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=200be51dc7473aa356d86fbf50c9c7e40a0f663e commit 200be51dc7473aa356d86fbf50c9c7e40a0f663e Author: Guillem Jover <guil...@debian.org> AuthorDate: Sat Mar 4 22:57:17 2023 +0100 dselect: Reduce variable scope to avoid shadowing Warned-by: perlcritic Addresses: Variables::ProhibitReusedNames --- dselect/methods/ftp/install.pl | 5 +++-- dselect/mkcurkeys.pl | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dselect/methods/ftp/install.pl b/dselect/methods/ftp/install.pl index 64af2ee6b..b4704ed51 100755 --- a/dselect/methods/ftp/install.pl +++ b/dselect/methods/ftp/install.pl @@ -183,12 +183,12 @@ sub procpkgfile { } print "\nProcessing Package files...\n"; -my ($fn, $i, $j); +my ($i, $j); $i = 0; foreach my $site (@{$CONFIG{site}}) { $j = 0; foreach my $dist (@{$site->[2]}) { - $fn = $dist; + my $fn = $dist; $fn =~ tr#/#_#; $fn = "Packages.$site->[0].$fn"; if (-f $fn) { @@ -413,6 +413,7 @@ if($totsize != 0) { if (yesno('y', "\nDo you want to retry downloading at once")) { # get the first $fn that foreach would give: # this is the one that got interrupted. + my $fn; MY_ITER: foreach my $ffn (keys(%downloads)) { $fn = $ffn; last MY_ITER; diff --git a/dselect/mkcurkeys.pl b/dselect/mkcurkeys.pl index fdb9492ee..3c8a128d4 100755 --- a/dselect/mkcurkeys.pl +++ b/dselect/mkcurkeys.pl @@ -48,14 +48,12 @@ for my $i (1 .. 26) { $let++; } -my ($k, $v); - open(my $header_fh, '<', $ARGV[1]) or die $!; while (<$header_fh>) { s/\s+$//; m/#define KEY_(\w+)\s+\d+\s+/p || next; my $rhs = ${^POSTMATCH}; - $k = "KEY_$1"; + my $k = "KEY_$1"; $base{$k} = capit($1); $rhs =~ s/(\w)[\(\)]/$1/g; $rhs =~ s/\w+ \((\w+)\)/$1/; @@ -84,8 +82,8 @@ END my ($comma); for my $i (33 .. 126) { - $k = $i; - $v = pack('C', $i); + my $k = $i; + my $v = pack('C', $i); if ($v eq ',') { $comma = $k; next; } p($k, $v); } @@ -98,6 +96,7 @@ for my $k (sort { $a cmp $b } keys %base) { ## use critic + my $v; $v = $base{$k}; $v = $name{$k} if defined($name{$k}); $v = $over{$k} if defined($over{$k}); -- Dpkg.Org's dpkg