… | |
… | |
86 | my $has_ev_adns; |
86 | my $has_ev_adns; |
87 | |
87 | |
88 | sub has_ev_adns { |
88 | sub has_ev_adns { |
89 | ($has_ev_adns ||= do { |
89 | ($has_ev_adns ||= do { |
90 | my $model = AnyEvent::detect; |
90 | my $model = AnyEvent::detect; |
91 | (($model eq "AnyEvent::Impl::CoroEV" or $model eq "AnyEvent::Impl::EV") |
|
|
92 | && eval { local $SIG{__DIE__}; require EV::ADNS }) |
91 | ($model eq "AnyEvent::Impl::EV" && eval { local $SIG{__DIE__}; require EV::ADNS }) |
93 | ? 2 : 1 # so that || always detects as true |
92 | ? 2 : 1 # so that || always detects as true |
94 | }) - 1 # 2 => true, 1 => false |
93 | }) - 1 # 2 => true, 1 => false |
95 | } |
94 | } |
96 | |
95 | |
97 | =item AnyEvent::Util::inet_aton $name_or_address, $cb->($binary_address_or_undef) |
96 | =item AnyEvent::Util::inet_aton $name_or_address, $cb->($binary_address_or_undef) |