libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 53 forks source link

Install fails on OS X Lion #204

Closed spazm closed 7 years ago

spazm commented 7 years ago

m...@probably.co.uk reported on Dec 19, 2011

t/local/back.t fails during 404 test if your resolver returns an address for 'localhost' that's not 127.0.0.1

Like:

MacBook:~$ grep new xx.pl 
my $server = HTTP::Daemon->new(LocalAddr => 'localhost') or die;
MacBook:~$ ./xx.pl 
$VAR1 = 'http://o2wirelessbox.lan:52303/';

It's irrelevant if localhost is in /etc/hosts - Lion looks at DNS _then_ /etc/hosts. Annoyingly it appears you cannot change the resolution order on Lion either! This may even only occur with certain resolvers.

I hacked up a patch to the test just to see if I could get it to work ok on my laptop, and it does. That's attached. It may not be the most elegant solution ;)

Details

Imported from Google Code issue 227 via archive

oalders commented 7 years ago

Closing for now. Can re-open if it happens on later MacOS versions.