… | |
… | |
1033 | no warnings; |
1033 | no warnings; |
1034 | use strict qw(vars subs); |
1034 | use strict qw(vars subs); |
1035 | |
1035 | |
1036 | use Carp; |
1036 | use Carp; |
1037 | |
1037 | |
1038 | our $VERSION = 4.81; |
1038 | our $VERSION = 4.82; |
1039 | our $MODEL; |
1039 | our $MODEL; |
1040 | |
1040 | |
1041 | our $AUTOLOAD; |
1041 | our $AUTOLOAD; |
1042 | our @ISA; |
1042 | our @ISA; |
1043 | |
1043 | |
… | |
… | |
1072 | # as the pureperl backend should work everywhere |
1072 | # as the pureperl backend should work everywhere |
1073 | # and is usually faster |
1073 | # and is usually faster |
1074 | [Glib:: => AnyEvent::Impl::Glib::], # becomes extremely slow with many watchers |
1074 | [Glib:: => AnyEvent::Impl::Glib::], # becomes extremely slow with many watchers |
1075 | [Event::Lib:: => AnyEvent::Impl::EventLib::], # too buggy |
1075 | [Event::Lib:: => AnyEvent::Impl::EventLib::], # too buggy |
1076 | [Tk:: => AnyEvent::Impl::Tk::], # crashes with many handles |
1076 | [Tk:: => AnyEvent::Impl::Tk::], # crashes with many handles |
|
|
1077 | [Qt:: => AnyEvent::Impl::Qt::], # requires special main program |
1077 | [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza |
1078 | [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza |
1078 | [Qt:: => AnyEvent::Impl::Qt::], # requires special main program |
|
|
1079 | [Wx:: => AnyEvent::Impl::POE::], |
1079 | [Wx:: => AnyEvent::Impl::POE::], |
1080 | [Prima:: => AnyEvent::Impl::POE::], |
1080 | [Prima:: => AnyEvent::Impl::POE::], |
1081 | # IO::Async is just too broken - we would need workarounds for its |
1081 | # IO::Async is just too broken - we would need workarounds for its |
1082 | # byzantine signal and broken child handling, among others. |
1082 | # byzantine signal and broken child handling, among others. |
1083 | # IO::Async is rather hard to detect, as it doesn't have any |
1083 | # IO::Async is rather hard to detect, as it doesn't have any |
… | |
… | |
1119 | |
1119 | |
1120 | if ($ENV{PERL_ANYEVENT_MODEL} =~ /^([a-zA-Z]+)$/) { |
1120 | if ($ENV{PERL_ANYEVENT_MODEL} =~ /^([a-zA-Z]+)$/) { |
1121 | my $model = "AnyEvent::Impl::$1"; |
1121 | my $model = "AnyEvent::Impl::$1"; |
1122 | if (eval "require $model") { |
1122 | if (eval "require $model") { |
1123 | $MODEL = $model; |
1123 | $MODEL = $model; |
1124 | warn "AnyEvent: loaded model '$model' (forced by \$PERL_ANYEVENT_MODEL), using it.\n" if $verbose > 1; |
1124 | warn "AnyEvent: loaded model '$model' (forced by \$ENV{PERL_ANYEVENT_MODEL}), using it.\n" if $verbose > 1; |
1125 | } else { |
1125 | } else { |
1126 | warn "AnyEvent: unable to load model '$model' (from \$PERL_ANYEVENT_MODEL):\n$@" if $verbose; |
1126 | warn "AnyEvent: unable to load model '$model' (from \$ENV{PERL_ANYEVENT_MODEL}):\n$@" if $verbose; |
1127 | } |
1127 | } |
1128 | } |
1128 | } |
1129 | |
1129 | |
1130 | # check for already loaded models |
1130 | # check for already loaded models |
1131 | unless ($MODEL) { |
1131 | unless ($MODEL) { |
… | |
… | |
2100 | |
2100 | |
2101 | A handler for C<SIGCHLD> is installed by AnyEvent's child watcher |
2101 | A handler for C<SIGCHLD> is installed by AnyEvent's child watcher |
2102 | emulation for event loops that do not support them natively. Also, some |
2102 | emulation for event loops that do not support them natively. Also, some |
2103 | event loops install a similar handler. |
2103 | event loops install a similar handler. |
2104 | |
2104 | |
2105 | If, when AnyEvent is loaded, SIGCHLD is set to IGNORE, then AnyEvent will |
2105 | Additionally, when AnyEvent is loaded and SIGCHLD is set to IGNORE, then |
2106 | reset it to default, to avoid losing child exit statuses. |
2106 | AnyEvent will reset it to default, to avoid losing child exit statuses. |
2107 | |
2107 | |
2108 | =item SIGPIPE |
2108 | =item SIGPIPE |
2109 | |
2109 | |
2110 | A no-op handler is installed for C<SIGPIPE> when C<$SIG{PIPE}> is C<undef> |
2110 | A no-op handler is installed for C<SIGPIPE> when C<$SIG{PIPE}> is C<undef> |
2111 | when AnyEvent gets loaded. |
2111 | when AnyEvent gets loaded. |