… | |
… | |
1395 | our @methods = qw(io timer time now now_update signal child idle condvar); |
1395 | our @methods = qw(io timer time now now_update signal child idle condvar); |
1396 | |
1396 | |
1397 | sub detect() { |
1397 | sub detect() { |
1398 | return $MODEL if $MODEL; # some programs keep references to detect |
1398 | return $MODEL if $MODEL; # some programs keep references to detect |
1399 | |
1399 | |
|
|
1400 | # IO::Async::Loop::AnyEvent is extremely evil, refuse to work with it |
|
|
1401 | # the author knows about the problems and what it does to AnyEvent as a whole |
|
|
1402 | # (and the ability of others to use AnyEvent), but simply wants to abuse AnyEvent |
|
|
1403 | # anyway. |
|
|
1404 | AnyEvent::log fatal => "AnyEvent: IO::Async::Loop::AnyEvent detected - this module is broken by design,\n" |
|
|
1405 | . "abuses internals and breaks AnyEvent, will not continue." |
|
|
1406 | if exists $INC{"IO/Async/Loop/AnyEvent.pm"}; |
|
|
1407 | |
1400 | local $!; # for good measure |
1408 | local $!; # for good measure |
1401 | local $SIG{__DIE__}; # we use eval |
1409 | local $SIG{__DIE__}; # we use eval |
1402 | |
1410 | |
1403 | # free some memory |
1411 | # free some memory |
1404 | *detect = sub () { $MODEL }; |
1412 | *detect = sub () { $MODEL }; |