From 008ae6a0ef7f87df8ee75ca523c6adf1ae0b768d Mon Sep 17 00:00:00 2001 From: Elvin Aslanov Date: Tue, 22 Aug 2023 12:30:46 +0200 Subject: [PATCH] Maintainers.pl: use strict/warnings with "our" Add 2 pragmas, and scope globals with "our". Scoped %Maintainers and %DistName (autovivified hashes) with our. Fixes #21410 --- Archive: https://github.com/Perl/perl5/pull/21412 --- Porting/Maintainers.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index e8c024aedbba..f37f7aa0b8d3 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -8,6 +8,8 @@ package Maintainers; +use strict; +use warnings; use utf8; use File::Glob qw(:case); @@ -15,7 +17,7 @@ package Maintainers; # distribution, need not appear in core (i.e. core-cpan-diff won't # complain if it can't find them) -@IGNORABLE = qw( +our @IGNORABLE = qw( .cvsignore .dualLivedDiffConfig .gitignore .github .perlcriticrc .perltidyrc .travis.yml ANNOUNCE Announce Artistic AUTHORS BENCHMARK BUGS Build.PL CHANGELOG ChangeLog Changelog CHANGES Changes CONTRIBUTING CONTRIBUTING.md @@ -124,7 +126,7 @@ package Maintainers; # '' => 'lib/Foo/Bar/', # } -%Modules = ( +our %Modules = ( 'Archive::Tar' => { 'DISTRIBUTION' => 'BINGOS/Archive-Tar-2.40.tar.gz', @@ -1487,7 +1489,7 @@ package Maintainers; }, ); - +our %DistName; # legacy CPAN flag for my $mod_name ( keys %Modules ) { my $data = $Modules{$mod_name}; @@ -1515,6 +1517,7 @@ package Maintainers; } } +our %Maintainers; # legacy MAINTAINER field for ( keys %Modules ) { # Keep any existing MAINTAINER flag so that "overrides" can be applied