I tried to install AnyEvent Perl module from CPAN. It was always failing with the test
t/81_hosts.t as mentioned in this bug log.
There is a workaround available (well, it worked for me). Once the distribution package gets downloaded but before the tests start to execute, disable your internet connection. That’s it. You will see the module getting installed successfully.