Changeset 29620

Show
Ignore:
Timestamp:
02/06/09 11:38:54 (4 years ago)
Author:
yappo
Message:

loopback address hacks for win32

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Role/RequestBuilder/Standard.pm

    r26174 r29620  
    2222} 
    2323 
     24# for win32 hacks 
     25BEGIN { 
     26    if ($^O eq 'MSWin32') { 
     27        no warnings 'redefine'; 
     28        *_build_hostname = sub { 
     29            my ( $self, $req ) = @_; 
     30            my $address = $req->address; 
     31            return 'localhost' if $address; 
     32            return gethostbyaddr( inet_aton( $req->address ), AF_INET ); 
     33        }; 
     34    } 
     35} 
     36 
    24371;