… | |
… | |
60 | Work exactly like their perl counterparts, but do not block. Currently |
60 | Work exactly like their perl counterparts, but do not block. Currently |
61 | this is being implemented by forking, so it's not exactly low-cost. |
61 | this is being implemented by forking, so it's not exactly low-cost. |
62 | |
62 | |
63 | =cut |
63 | =cut |
64 | |
64 | |
65 | my $netdns = 0 && eval { use Net::DNS 0.24 }; |
65 | my $netdns = eval { require Net::DNS::Resolver; new Net::DNS::Resolver; 0 }; |
66 | |
66 | |
67 | sub gethostbyname($) { |
67 | sub gethostbyname($) { |
68 | if ($netdns) { |
68 | if ($netdns) { |
|
|
69 | #$netdns->query($_[0]); |
69 | die; |
70 | die; |
70 | } else { |
71 | } else { |
71 | _do_asy { gethostbyname $_[0] } @_; |
72 | _do_asy { gethostbyname $_[0] } @_; |
72 | } |
73 | } |
73 | } |
74 | } |