diff options
author | Curtis Jewell <perl@csjewell.fastmail.us> | 2010-08-24 14:07:51 -0600 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-02 03:05:07 +0200 |
commit | be54382c6ee2d28448a2bfa85dedcbb6144583ae (patch) | |
tree | d5a9928bb839d6f0a09e56b4103cd04f6526d70c /ext/Errno | |
parent | 11ce4a763a0bb03971d6097fecf93928e61db557 (diff) | |
download | perl-be54382c6ee2d28448a2bfa85dedcbb6144583ae.tar.gz |
Sanity check on Errno values.
On a few machines (Win32/gcc using mingw64 headers) Errno.pm
will find a value that is not numeric for a proposed error
key. This change adds a sanity check to discard such keys.
Diffstat (limited to 'ext/Errno')
-rw-r--r-- | ext/Errno/Errno_pm.PL | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 0899ddea91..d33cd26c39 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -357,8 +357,9 @@ my %err; BEGIN { %err = ( EDQ - - my @err = sort { $err{$a} <=> $err{$b} } keys %err; + + my @err = sort { $err{$a} <=> $err{$b} } + grep { $err{$_} =~ /-?\d+$/ } keys %err; foreach $err (@err) { print "\t$err => $err{$err},\n"; |