268
|
0 |
0 |
if (my $cr = {AnyEvent => sub () {
package Promise::XS::Deferred;
require AnyEvent;
___set_deferral_generic('AnyEvent'->can('postpone') || \&Promise::XS::Deferred::_anyevent_postpone_compat, undef, &_DEFER_ANYEVENT());
}
, IO::Async => sub {
package Promise::XS::Deferred;
my($loop) = @_;
___set_deferral_generic($loop->can('later') || \&Promise::XS::Deferred::_ioasync_later_compat, $loop, &_DEFER_IOASYNC(), sub {
$loop->stop;
}
);
}
, Mojo::IOLoop => sub () {
package Promise::XS::Deferred;
require Mojo::IOLoop;
___set_deferral_generic('Mojo::IOLoop'->can('next_tick') || \&Promise::XS::Deferred::_mojo_next_tick_compat, 'Mojo::IOLoop', &_DEFER_MOJO(), sub {
'Mojo::IOLoop'->stop;
}
);
}
}->{$name}) { } |