AnyEvent resolves hostnames always via DNS

Marc Lehmann schmorp at schmorp.de
Fri Mar 9 21:41:11 CET 2012


On Fri, Mar 09, 2012 at 03:41:46PM +0100, Piotr Roszatycki <piotr.roszatycki at gmail.com> wrote:
> Example in AnyEvent/Socket.pm is measliding:

Not really, it doesn't claim to support nss.

> libc6 inet_aton resolves also hostnames but it could be just an extra

It's an undocumented feature, but the point is that anyevent does not
implement nss, nor should it - nss cannot provide the same info as dns
does. for example, you can't provide xmpp/jabber servers via /etc/hosts.

> Still the same:
> 
> Socket:1.1.1.1
> AnyEvent:192.0.43.10

Socket is wrong, example.com resolves to (among other things) 192.0.43.10,
so AnyEvent is correct, because it (correctly) prefers DNS.

> I don't want to save the world, which uses /etc/hosts for wrong
> things. I want just make some AnyEvent-based applications working
> without DNS.

They do, and nothing you have said contains any evidence to the contrary.
Even your example above suggests that DNS *is* available.

If DNS is not available, AnyEvent will use /etc/hosts, as it should. It
doesn't matter how often you claim the opposite, it will not magically
become true.

> AnyEvent::DNS::a. It's very fortunate that Perl allows to fix some
> broken libraries easly.

AnyEvent is not broken - it gives correct results. But it seems clear by
now that you are just trolling, so I will not waste my time any further
with you.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list