diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-24 18:20:04 +0100 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-24 18:30:28 +0100 |
commit | cb2b5788e3a043ab23b2ec54670723c93ef70e1b (patch) | |
tree | 05b563c2fe1934754cfd9cb68f67348758e05404 /mcon/pl | |
parent | 725b65bac4a3e5257179db89d1134ec126ca208f (diff) |
Use a "%" sigil when calling Perl keys() / each()
This usage has produced a depreaction warning since Perl 5.000, and was
finally removed in Perl 5.22.
Diffstat (limited to 'mcon/pl')
-rw-r--r-- | mcon/pl/xwant.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mcon/pl/xwant.pl b/mcon/pl/xwant.pl index 31508eb..e1bbf20 100644 --- a/mcon/pl/xwant.pl +++ b/mcon/pl/xwant.pl @@ -49,7 +49,7 @@ sub build_xref { print " Scanning .[chyl] files for symbols...\n" unless $opt_s; $search = ' ' x (40 * (@cmaster + @ocmaster)); # Pre-extend $search = "while (<>) {study;\n"; # Init loop over ARGV - foreach $key (keys(cmaster)) { + foreach $key (keys(%cmaster)) { $search .= "\$cmaster{'$key'} .= \"\$ARGV#\" if /\\b$key\\b/;\n"; } foreach $key (grep(!/^\$/, keys %Obsolete)) { @@ -63,7 +63,7 @@ sub build_xref { eval $search; eval ''; $/ = "\n"; - while (($key,$value) = each(cmaster)) { + while (($key,$value) = each(%cmaster)) { next if $value eq ''; foreach $file (sort(split(/#/, $value))) { next if $file eq ''; @@ -94,7 +94,7 @@ sub build_xref { $search = ' ' x (40 * (@shmaster + @oshmaster)); # Pre-extend $search = "while (<>) {study;\n"; # All the keys already have a leading '$' - foreach $key (keys(shmaster)) { + foreach $key (keys(%shmaster)) { $search .= "\$shmaster{'$key'} .= \"\$ARGV#\" if /\\$key\\b/;\n"; } foreach $key (grep (/^\$/, keys %Obsolete)) { @@ -108,7 +108,7 @@ sub build_xref { eval $search; eval ''; $/ = "\n"; - while (($key,$value) = each(shmaster)) { + while (($key,$value) = each(%shmaster)) { next if $value eq ''; foreach $file (sort(split(/#/, $value))) { next if $file eq ''; |