AnyEvent-Whois-Raw
view release on metacpan or search on metacpan
lib/AnyEvent/Whois/Raw.pm view on Meta::CPAN
equivalents will be started. But when AnyEvent based function called result not ready
yet and we should interrupt get_all_whois. We do it using die("Call me later").
_whois and _get_whois ready to receive exception, they uses eval to catch it and calls
callback only if there was no exceptions. When result from AnyEvent based function becomes
ready it saves result and calls _whois or _get_whois again with same arguments as before interrupt.
So, now get_all_whois will not block because result already ready. Net::Whois::Raw::whois() or
Net::Whois::Raw::get_whois() will return without exceptions and so, callback will be called.
To store current state we are using localized stash.
recursive_whois() has one problem, it catches exceptions and our die("Call me later") will not interrupt
it. We using require hook to workaround it. We replace eval with our
defined smart_eval, which will rethrow exception if it was our exception.
=pod
=head1 NAME
AnyEvent::Whois::Raw - Non-blocking wrapper for Net::Whois::Raw
=head1 SYNOPSIS
use AnyEvent::Whois::Raw;
( run in 0.368 second using v1.01-cache-2.11-cpan-8d75d55dd25 )