… | |
… | |
1167 | |
1167 | |
1168 | BEGIN { AnyEvent::common_sense } |
1168 | BEGIN { AnyEvent::common_sense } |
1169 | |
1169 | |
1170 | use Carp (); |
1170 | use Carp (); |
1171 | |
1171 | |
1172 | our $VERSION = '5.271'; |
1172 | our $VERSION = '5.29'; |
1173 | our $MODEL; |
1173 | our $MODEL; |
1174 | |
1174 | |
1175 | our $AUTOLOAD; |
1175 | our $AUTOLOAD; |
1176 | our @ISA; |
1176 | our @ISA; |
1177 | |
1177 | |
… | |
… | |
1291 | last; |
1291 | last; |
1292 | } |
1292 | } |
1293 | } |
1293 | } |
1294 | |
1294 | |
1295 | $MODEL |
1295 | $MODEL |
1296 | or die "No event module selected for AnyEvent and autodetect failed. Install any one of these modules: EV, Event or Glib.\n"; |
1296 | or die "AnyEvent: backend autodetection failed - did you properly install AnyEvent?\n"; |
1297 | } |
1297 | } |
1298 | } |
1298 | } |
1299 | |
1299 | |
1300 | @models = (); # free probe data |
1300 | @models = (); # free probe data |
1301 | |
1301 | |
1302 | push @{"$MODEL\::ISA"}, "AnyEvent::Base"; |
1302 | push @{"$MODEL\::ISA"}, "AnyEvent::Base"; |
1303 | unshift @ISA, $MODEL; |
1303 | unshift @ISA, $MODEL; |
1304 | |
1304 | |
1305 | # now nuke some methods that are overriden by the backend. |
1305 | # now nuke some methods that are overridden by the backend. |
1306 | # SUPER is not allowed. |
1306 | # SUPER is not allowed. |
1307 | for (qw(time signal child idle)) { |
1307 | for (qw(time signal child idle)) { |
1308 | undef &{"AnyEvent::Base::$_"} |
1308 | undef &{"AnyEvent::Base::$_"} |
1309 | if defined &{"$MODEL\::$_"}; |
1309 | if defined &{"$MODEL\::$_"}; |
1310 | } |
1310 | } |
1311 | |
1311 | |
1312 | require AnyEvent::Strict if $ENV{PERL_ANYEVENT_STRICT}; |
1312 | if ($ENV{PERL_ANYEVENT_STRICT}) { |
|
|
1313 | eval { require AnyEvent::Strict }; |
|
|
1314 | warn "AnyEvent: cannot load AnyEvent::Strict: $@" |
|
|
1315 | if $@ && $VERBOSE; |
|
|
1316 | } |
1313 | |
1317 | |
1314 | (shift @post_detect)->() while @post_detect; |
1318 | (shift @post_detect)->() while @post_detect; |
1315 | |
1319 | |
1316 | *post_detect = sub(&) { |
1320 | *post_detect = sub(&) { |
1317 | shift->(); |
1321 | shift->(); |
… | |
… | |
2679 | Non-blocking file handles, sockets, TCP clients and |
2683 | Non-blocking file handles, sockets, TCP clients and |
2680 | servers: L<AnyEvent::Handle>, L<AnyEvent::Socket>, L<AnyEvent::TLS>. |
2684 | servers: L<AnyEvent::Handle>, L<AnyEvent::Socket>, L<AnyEvent::TLS>. |
2681 | |
2685 | |
2682 | Asynchronous DNS: L<AnyEvent::DNS>. |
2686 | Asynchronous DNS: L<AnyEvent::DNS>. |
2683 | |
2687 | |
2684 | Thread support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV L<Coro::Event >, |
2688 | Thread support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, L<Coro::Event>. |
2685 | |
2689 | |
2686 | Nontrivial usage examples: L<AnyEvent::GPSD>, L<AnyEvent::IRC>, |
2690 | Nontrivial usage examples: L<AnyEvent::GPSD>, L<AnyEvent::IRC>, |
2687 | L<AnyEvent::HTTP>. |
2691 | L<AnyEvent::HTTP>. |
2688 | |
2692 | |
2689 | |
2693 | |