AnyEvent-DNS-EtcHosts
view release on metacpan or search on metacpan
lib/AnyEvent/DNS/EtcHosts.pm view on Meta::CPAN
push @HOSTS_CHECKING, sub {
$cont->();
$cv->end;
};
unless ($#HOSTS_CHECKING) {
# we are not the first, so we actually have to do the work
require AnyEvent::IO;
AnyEvent::IO::aio_stat(
$etc_hosts,
sub {
if ((stat _)[9] ne ($HOSTS_MTIME || 0)) {
AE::log 8 => "(re)loading $etc_hosts.";
$HOSTS_MTIME = (stat _)[9];
# we might load a newer version of hosts,but that's a harmless race,
# as the next call will just load it again.
AnyEvent::IO::aio_load(
$etc_hosts,
( run in 0.988 second using v1.01-cache-2.11-cpan-49f99fa48dc )