Bugfix to Socket.pm 's GAI fallback constants - use $name rather than $_
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Thu, 16 Dec 2010 11:49:49 +0000 (11:49 +0000)
committerJesse Vincent <jesse@bestpractical.com>
Mon, 3 Jan 2011 04:21:35 +0000 (12:21 +0800)
ext/Socket/Socket.pm

index 4a57929..6e0f95b 100644 (file)
@@ -610,7 +610,7 @@ if( !defined &getaddrinfo ) {
    );
 
    foreach my $name ( keys %constants ) {
-      my $value = $constants{$_};
+      my $value = $constants{$name};
 
       no strict 'refs';
       defined &$name or *$name = sub () { $value };