AnyEvent::CacheDNS - Simple DNS resolver with caching
use AnyEvent::Impl::Perl; use AnyEvent; use AnyEvent::HTTP; # Register our DNS resolver as the default resolver use AnyEvent::CacheDNS ':register'; # Use AnyEvent as ususal my $cond = AnyEvent->condvar; http_get "http://search.cpan.org/", sub { $cond->send(); }; $cond->recv();
This module provides a very simple DNS resolver that caches its results and can improve the connection times to remote hosts.
It's possible to register the this class as AnyEvent's main DNS resolver by passing the tag :register in the use statement.
:register
use
Registers a new DNS cache instance as AnyEvent's global DNS resolver.
Emmanuel Rodriguez <potyl@cpan.org>
(C) 2011 Emmanuel Rodriguez - All Rights Reserved.
To install AnyEvent::CacheDNS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::CacheDNS
CPAN shell
perl -MCPAN -e shell install AnyEvent::CacheDNS
For more information on module installation, please visit the detailed CPAN module installation guide.