1 | =head1 NAME |
1 | =head1 NAME |
2 | |
2 | |
3 | AnyEvent - provide framework for multiple event loops |
3 | AnyEvent - events independent of event loop implementation |
4 | |
4 | |
5 | EV, Event, Glib, Tk, Perl, Event::Lib, Qt and POE are various supported |
5 | EV, Event, Glib, Tk, Perl, Event::Lib, Qt and POE are various supported |
6 | event loops. |
6 | event loops. |
7 | |
7 | |
8 | =head1 SYNOPSIS |
8 | =head1 SYNOPSIS |
… | |
… | |
40 | =head1 INTRODUCTION/TUTORIAL |
40 | =head1 INTRODUCTION/TUTORIAL |
41 | |
41 | |
42 | This manpage is mainly a reference manual. If you are interested |
42 | This manpage is mainly a reference manual. If you are interested |
43 | in a tutorial or some gentle introduction, have a look at the |
43 | in a tutorial or some gentle introduction, have a look at the |
44 | L<AnyEvent::Intro> manpage. |
44 | L<AnyEvent::Intro> manpage. |
|
|
45 | |
|
|
46 | =head1 SUPPORT |
|
|
47 | |
|
|
48 | There is a mailinglist for discussing all things AnyEvent, and an IRC |
|
|
49 | channel, too. |
|
|
50 | |
|
|
51 | See the AnyEvent project page at the B<Schmorpforge Ta-Sa Software |
|
|
52 | Respository>, at L<http://anyevent.schmorp.de>, for more info. |
45 | |
53 | |
46 | =head1 WHY YOU SHOULD USE THIS MODULE (OR NOT) |
54 | =head1 WHY YOU SHOULD USE THIS MODULE (OR NOT) |
47 | |
55 | |
48 | Glib, POE, IO::Async, Event... CPAN offers event models by the dozen |
56 | Glib, POE, IO::Async, Event... CPAN offers event models by the dozen |
49 | nowadays. So what is different about AnyEvent? |
57 | nowadays. So what is different about AnyEvent? |
… | |
… | |
368 | |
376 | |
369 | This watcher might use C<%SIG> (depending on the event loop used), |
377 | This watcher might use C<%SIG> (depending on the event loop used), |
370 | so programs overwriting those signals directly will likely not work |
378 | so programs overwriting those signals directly will likely not work |
371 | correctly. |
379 | correctly. |
372 | |
380 | |
|
|
381 | Example: exit on SIGINT |
|
|
382 | |
|
|
383 | my $w = AnyEvent->signal (signal => "INT", cb => sub { exit 1 }); |
|
|
384 | |
|
|
385 | =head3 Signal Races, Delays and Workarounds |
|
|
386 | |
373 | Also note that many event loops (e.g. Glib, Tk, Qt, IO::Async) do not |
387 | Many event loops (e.g. Glib, Tk, Qt, IO::Async) do not support attaching |
374 | support attaching callbacks to signals, which is a pity, as you cannot do |
388 | callbacks to signals in a generic way, which is a pity, as you cannot do |
375 | race-free signal handling in perl. AnyEvent will try to do it's best, but |
389 | race-free signal handling in perl. AnyEvent will try to do it's best, but |
376 | in some cases, signals will be delayed. The maximum time a signal might |
390 | in some cases, signals will be delayed. The maximum time a signal might |
377 | be delayed is specified in C<$AnyEvent::MAX_SIGNAL_LATENCY> (default: 10 |
391 | be delayed is specified in C<$AnyEvent::MAX_SIGNAL_LATENCY> (default: 10 |
378 | seconds). This variable can be changed only before the first signal |
392 | seconds). This variable can be changed only before the first signal |
379 | watcher is created, and should be left alone otherwise. Higher values |
393 | watcher is created, and should be left alone otherwise. Higher values |
380 | will cause fewer spurious wake-ups, which is better for power and CPU |
394 | will cause fewer spurious wake-ups, which is better for power and CPU |
381 | saving. All these problems can be avoided by installing the optional |
395 | saving. All these problems can be avoided by installing the optional |
382 | L<Async::Interrupt> module. |
396 | L<Async::Interrupt> module. This will not work with inherently broken |
383 | |
397 | event loops such as L<Event> or L<Event::Lib> (and not with L<POE> |
384 | Example: exit on SIGINT |
398 | currently, as POE does it's own workaround with one-second latency). With |
385 | |
399 | those, you just have to suffer the delays. |
386 | my $w = AnyEvent->signal (signal => "INT", cb => sub { exit 1 }); |
|
|
387 | |
400 | |
388 | =head2 CHILD PROCESS WATCHERS |
401 | =head2 CHILD PROCESS WATCHERS |
389 | |
402 | |
390 | You can also watch on a child process exit and catch its exit status. |
403 | You can also watch on a child process exit and catch its exit status. |
391 | |
404 | |
… | |
… | |
504 | Condition variables are similar to callbacks, except that you can |
517 | Condition variables are similar to callbacks, except that you can |
505 | optionally wait for them. They can also be called merge points - points |
518 | optionally wait for them. They can also be called merge points - points |
506 | in time where multiple outstanding events have been processed. And yet |
519 | in time where multiple outstanding events have been processed. And yet |
507 | another way to call them is transactions - each condition variable can be |
520 | another way to call them is transactions - each condition variable can be |
508 | used to represent a transaction, which finishes at some point and delivers |
521 | used to represent a transaction, which finishes at some point and delivers |
509 | a result. |
522 | a result. And yet some people know them as "futures" - a promise to |
|
|
523 | compute/deliver something that you can wait for. |
510 | |
524 | |
511 | Condition variables are very useful to signal that something has finished, |
525 | Condition variables are very useful to signal that something has finished, |
512 | for example, if you write a module that does asynchronous http requests, |
526 | for example, if you write a module that does asynchronous http requests, |
513 | then a condition variable would be the ideal candidate to signal the |
527 | then a condition variable would be the ideal candidate to signal the |
514 | availability of results. The user can either act when the callback is |
528 | availability of results. The user can either act when the callback is |
… | |
… | |
865 | event module detection too early, for example, L<AnyEvent::AIO> creates |
879 | event module detection too early, for example, L<AnyEvent::AIO> creates |
866 | and installs the global L<IO::AIO> watcher in a C<post_detect> block to |
880 | and installs the global L<IO::AIO> watcher in a C<post_detect> block to |
867 | avoid autodetecting the event module at load time. |
881 | avoid autodetecting the event module at load time. |
868 | |
882 | |
869 | If called in scalar or list context, then it creates and returns an object |
883 | If called in scalar or list context, then it creates and returns an object |
870 | that automatically removes the callback again when it is destroyed. See |
884 | that automatically removes the callback again when it is destroyed (or |
|
|
885 | C<undef> when the hook was immediately executed). See L<AnyEvent::AIO> for |
871 | L<Coro::BDB> for a case where this is useful. |
886 | a case where this is useful. |
|
|
887 | |
|
|
888 | Example: Create a watcher for the IO::AIO module and store it in |
|
|
889 | C<$WATCHER>. Only do so after the event loop is initialised, though. |
|
|
890 | |
|
|
891 | our WATCHER; |
|
|
892 | |
|
|
893 | my $guard = AnyEvent::post_detect { |
|
|
894 | $WATCHER = AnyEvent->io (fh => IO::AIO::poll_fileno, poll => 'r', cb => \&IO::AIO::poll_cb); |
|
|
895 | }; |
|
|
896 | |
|
|
897 | # the ||= is important in case post_detect immediately runs the block, |
|
|
898 | # as to not clobber the newly-created watcher. assigning both watcher and |
|
|
899 | # post_detect guard to the same variable has the advantage of users being |
|
|
900 | # able to just C<undef $WATCHER> if the watcher causes them grief. |
|
|
901 | |
|
|
902 | $WATCHER ||= $guard; |
872 | |
903 | |
873 | =item @AnyEvent::post_detect |
904 | =item @AnyEvent::post_detect |
874 | |
905 | |
875 | If there are any code references in this array (you can C<push> to it |
906 | If there are any code references in this array (you can C<push> to it |
876 | before or after loading AnyEvent), then they will called directly after |
907 | before or after loading AnyEvent), then they will called directly after |
… | |
… | |
1041 | |
1072 | |
1042 | =cut |
1073 | =cut |
1043 | |
1074 | |
1044 | package AnyEvent; |
1075 | package AnyEvent; |
1045 | |
1076 | |
|
|
1077 | # basically a tuned-down version of common::sense |
|
|
1078 | sub common_sense { |
1046 | no warnings; |
1079 | # no warnings |
|
|
1080 | ${^WARNING_BITS} ^= ${^WARNING_BITS}; |
1047 | use strict qw(vars subs); |
1081 | # use strict vars subs |
|
|
1082 | $^H |= 0x00000600; |
|
|
1083 | } |
|
|
1084 | |
|
|
1085 | BEGIN { AnyEvent::common_sense } |
1048 | |
1086 | |
1049 | use Carp (); |
1087 | use Carp (); |
1050 | |
1088 | |
1051 | our $VERSION = 4.83; |
1089 | our $VERSION = 4.86; |
1052 | our $MODEL; |
1090 | our $MODEL; |
1053 | |
1091 | |
1054 | our $AUTOLOAD; |
1092 | our $AUTOLOAD; |
1055 | our @ISA; |
1093 | our @ISA; |
1056 | |
1094 | |
… | |
… | |
1114 | my ($cb) = @_; |
1152 | my ($cb) = @_; |
1115 | |
1153 | |
1116 | if ($MODEL) { |
1154 | if ($MODEL) { |
1117 | $cb->(); |
1155 | $cb->(); |
1118 | |
1156 | |
1119 | 1 |
1157 | undef |
1120 | } else { |
1158 | } else { |
1121 | push @post_detect, $cb; |
1159 | push @post_detect, $cb; |
1122 | |
1160 | |
1123 | defined wantarray |
1161 | defined wantarray |
1124 | ? bless \$cb, "AnyEvent::Util::postdetect" |
1162 | ? bless \$cb, "AnyEvent::Util::postdetect" |
… | |
… | |
1130 | @post_detect = grep $_ != ${$_[0]}, @post_detect; |
1168 | @post_detect = grep $_ != ${$_[0]}, @post_detect; |
1131 | } |
1169 | } |
1132 | |
1170 | |
1133 | sub detect() { |
1171 | sub detect() { |
1134 | unless ($MODEL) { |
1172 | unless ($MODEL) { |
1135 | no strict 'refs'; |
|
|
1136 | local $SIG{__DIE__}; |
1173 | local $SIG{__DIE__}; |
1137 | |
1174 | |
1138 | if ($ENV{PERL_ANYEVENT_MODEL} =~ /^([a-zA-Z]+)$/) { |
1175 | if ($ENV{PERL_ANYEVENT_MODEL} =~ /^([a-zA-Z]+)$/) { |
1139 | my $model = "AnyEvent::Impl::$1"; |
1176 | my $model = "AnyEvent::Impl::$1"; |
1140 | if (eval "require $model") { |
1177 | if (eval "require $model") { |
… | |
… | |
1264 | $_->() for values %{ $SIG_CB{$_} || {} }; |
1301 | $_->() for values %{ $SIG_CB{$_} || {} }; |
1265 | } |
1302 | } |
1266 | } |
1303 | } |
1267 | } |
1304 | } |
1268 | |
1305 | |
|
|
1306 | # install a dumym wakeupw atcher to reduce signal catching latency |
|
|
1307 | sub _sig_add() { |
|
|
1308 | unless ($SIG_COUNT++) { |
|
|
1309 | # try to align timer on a full-second boundary, if possible |
|
|
1310 | my $NOW = AnyEvent->now; |
|
|
1311 | |
|
|
1312 | $SIG_TW = AnyEvent->timer ( |
|
|
1313 | after => $MAX_SIGNAL_LATENCY - ($NOW - int $NOW), |
|
|
1314 | interval => $MAX_SIGNAL_LATENCY, |
|
|
1315 | cb => sub { }, # just for the PERL_ASYNC_CHECK |
|
|
1316 | ); |
|
|
1317 | } |
|
|
1318 | } |
|
|
1319 | |
|
|
1320 | sub _sig_del { |
|
|
1321 | undef $SIG_TW |
|
|
1322 | unless --$SIG_COUNT; |
|
|
1323 | } |
|
|
1324 | |
1269 | sub _signal { |
1325 | sub _signal { |
1270 | my (undef, %arg) = @_; |
1326 | my (undef, %arg) = @_; |
1271 | |
1327 | |
1272 | my $signal = uc $arg{signal} |
1328 | my $signal = uc $arg{signal} |
1273 | or Carp::croak "required option 'signal' is missing"; |
1329 | or Carp::croak "required option 'signal' is missing"; |
… | |
… | |
1297 | undef $SIG_EV{$signal}; |
1353 | undef $SIG_EV{$signal}; |
1298 | }; |
1354 | }; |
1299 | |
1355 | |
1300 | # can't do signal processing without introducing races in pure perl, |
1356 | # can't do signal processing without introducing races in pure perl, |
1301 | # so limit the signal latency. |
1357 | # so limit the signal latency. |
1302 | ++$SIG_COUNT; |
1358 | _sig_add; |
1303 | $SIG_TW ||= AnyEvent->timer ( |
|
|
1304 | after => $MAX_SIGNAL_LATENCY, |
|
|
1305 | interval => $MAX_SIGNAL_LATENCY, |
|
|
1306 | cb => sub { }, # just for the PERL_ASYNC_CHECK |
|
|
1307 | ); |
|
|
1308 | } |
1359 | } |
1309 | |
1360 | |
1310 | bless [$signal, $arg{cb}], "AnyEvent::Base::signal" |
1361 | bless [$signal, $arg{cb}], "AnyEvent::Base::signal" |
1311 | } |
1362 | } |
1312 | |
1363 | |
… | |
… | |
1351 | } |
1402 | } |
1352 | |
1403 | |
1353 | sub AnyEvent::Base::signal::DESTROY { |
1404 | sub AnyEvent::Base::signal::DESTROY { |
1354 | my ($signal, $cb) = @{$_[0]}; |
1405 | my ($signal, $cb) = @{$_[0]}; |
1355 | |
1406 | |
1356 | undef $SIG_TW |
1407 | _sig_del; |
1357 | unless --$SIG_COUNT; |
|
|
1358 | |
1408 | |
1359 | delete $SIG_CB{$signal}{$cb}; |
1409 | delete $SIG_CB{$signal}{$cb}; |
1360 | |
1410 | |
|
|
1411 | $HAVE_ASYNC_INTERRUPT |
|
|
1412 | ? delete $SIG_ASY{$signal} |
1361 | # delete doesn't work with older perls - they then |
1413 | : # delete doesn't work with older perls - they then |
1362 | # print weird messages, or just unconditionally exit |
1414 | # print weird messages, or just unconditionally exit |
1363 | # instead of getting the default action. |
1415 | # instead of getting the default action. |
1364 | undef $SIG{$signal} |
1416 | undef $SIG{$signal} |
1365 | unless keys %{ $SIG_CB{$signal} }; |
1417 | unless keys %{ $SIG_CB{$signal} }; |
1366 | } |
1418 | } |
1367 | |
1419 | |
1368 | # default implementation for ->child |
1420 | # default implementation for ->child |
1369 | |
1421 | |
… | |
… | |
1386 | defined (my $pid = $arg{pid} + 0) |
1438 | defined (my $pid = $arg{pid} + 0) |
1387 | or Carp::croak "required option 'pid' is missing"; |
1439 | or Carp::croak "required option 'pid' is missing"; |
1388 | |
1440 | |
1389 | $PID_CB{$pid}{$arg{cb}} = $arg{cb}; |
1441 | $PID_CB{$pid}{$arg{cb}} = $arg{cb}; |
1390 | |
1442 | |
|
|
1443 | # WNOHANG is almost cetrainly 1 everywhere |
|
|
1444 | $WNOHANG ||= $^O =~ /^(?:openbsd|netbsd|linux|freebsd|cygwin|MSWin32)$/ |
|
|
1445 | ? 1 |
1391 | $WNOHANG ||= eval { local $SIG{__DIE__}; require POSIX; &POSIX::WNOHANG } || 1; |
1446 | : eval { local $SIG{__DIE__}; require POSIX; &POSIX::WNOHANG } || 1; |
1392 | |
1447 | |
1393 | unless ($CHLD_W) { |
1448 | unless ($CHLD_W) { |
1394 | $CHLD_W = AnyEvent->signal (signal => 'CHLD', cb => \&_sigchld); |
1449 | $CHLD_W = AnyEvent->signal (signal => 'CHLD', cb => \&_sigchld); |
1395 | # child could be a zombie already, so make at least one round |
1450 | # child could be a zombie already, so make at least one round |
1396 | &_sigchld; |
1451 | &_sigchld; |
… | |
… | |
1448 | |
1503 | |
1449 | our @ISA = AnyEvent::CondVar::Base::; |
1504 | our @ISA = AnyEvent::CondVar::Base::; |
1450 | |
1505 | |
1451 | package AnyEvent::CondVar::Base; |
1506 | package AnyEvent::CondVar::Base; |
1452 | |
1507 | |
1453 | use overload |
1508 | #use overload |
1454 | '&{}' => sub { my $self = shift; sub { $self->send (@_) } }, |
1509 | # '&{}' => sub { my $self = shift; sub { $self->send (@_) } }, |
1455 | fallback => 1; |
1510 | # fallback => 1; |
|
|
1511 | |
|
|
1512 | # save 300+ kilobytes by dirtily hardcoding overloading |
|
|
1513 | ${"AnyEvent::CondVar::Base::OVERLOAD"}{dummy}++; # Register with magic by touching. |
|
|
1514 | *{'AnyEvent::CondVar::Base::()'} = sub { }; # "Make it findable via fetchmethod." |
|
|
1515 | *{'AnyEvent::CondVar::Base::(&{}'} = sub { my $self = shift; sub { $self->send (@_) } }; # &{} |
|
|
1516 | ${'AnyEvent::CondVar::Base::()'} = 1; # fallback |
1456 | |
1517 | |
1457 | our $WAITING; |
1518 | our $WAITING; |
1458 | |
1519 | |
1459 | sub _send { |
1520 | sub _send { |
1460 | # nop |
1521 | # nop |
… | |
… | |
1551 | C<PERL_ANYEVENT_MODEL>. |
1612 | C<PERL_ANYEVENT_MODEL>. |
1552 | |
1613 | |
1553 | When set to C<2> or higher, cause AnyEvent to report to STDERR which event |
1614 | When set to C<2> or higher, cause AnyEvent to report to STDERR which event |
1554 | model it chooses. |
1615 | model it chooses. |
1555 | |
1616 | |
|
|
1617 | When set to C<8> or higher, then AnyEvent will report extra information on |
|
|
1618 | which optional modules it loads and how it implements certain features. |
|
|
1619 | |
1556 | =item C<PERL_ANYEVENT_STRICT> |
1620 | =item C<PERL_ANYEVENT_STRICT> |
1557 | |
1621 | |
1558 | AnyEvent does not do much argument checking by default, as thorough |
1622 | AnyEvent does not do much argument checking by default, as thorough |
1559 | argument checking is very costly. Setting this variable to a true value |
1623 | argument checking is very costly. Setting this variable to a true value |
1560 | will cause AnyEvent to load C<AnyEvent::Strict> and then to thoroughly |
1624 | will cause AnyEvent to load C<AnyEvent::Strict> and then to thoroughly |
1561 | check the arguments passed to most method calls. If it finds any problems, |
1625 | check the arguments passed to most method calls. If it finds any problems, |
1562 | it will croak. |
1626 | it will croak. |
1563 | |
1627 | |
1564 | In other words, enables "strict" mode. |
1628 | In other words, enables "strict" mode. |
1565 | |
1629 | |
1566 | Unlike C<use strict>, it is definitely recommended to keep it off in |
1630 | Unlike C<use strict> (or it's modern cousin, C<< use L<common::sense> |
1567 | production. Keeping C<PERL_ANYEVENT_STRICT=1> in your environment while |
1631 | >>, it is definitely recommended to keep it off in production. Keeping |
1568 | developing programs can be very useful, however. |
1632 | C<PERL_ANYEVENT_STRICT=1> in your environment while developing programs |
|
|
1633 | can be very useful, however. |
1569 | |
1634 | |
1570 | =item C<PERL_ANYEVENT_MODEL> |
1635 | =item C<PERL_ANYEVENT_MODEL> |
1571 | |
1636 | |
1572 | This can be used to specify the event model to be used by AnyEvent, before |
1637 | This can be used to specify the event model to be used by AnyEvent, before |
1573 | auto detection and -probing kicks in. It must be a string consisting |
1638 | auto detection and -probing kicks in. It must be a string consisting |
… | |
… | |
1635 | |
1700 | |
1636 | When neither C<ca_file> nor C<ca_path> was specified during |
1701 | When neither C<ca_file> nor C<ca_path> was specified during |
1637 | L<AnyEvent::TLS> context creation, and either of these environment |
1702 | L<AnyEvent::TLS> context creation, and either of these environment |
1638 | variables exist, they will be used to specify CA certificate locations |
1703 | variables exist, they will be used to specify CA certificate locations |
1639 | instead of a system-dependent default. |
1704 | instead of a system-dependent default. |
|
|
1705 | |
|
|
1706 | =item C<PERL_ANYEVENT_AVOID_GUARD> and C<PERL_ANYEVENT_AVOID_ASYNC_INTERRUPT> |
|
|
1707 | |
|
|
1708 | When these are set to C<1>, then the respective modules are not |
|
|
1709 | loaded. Mostly good for testing AnyEvent itself. |
1640 | |
1710 | |
1641 | =back |
1711 | =back |
1642 | |
1712 | |
1643 | =head1 SUPPLYING YOUR OWN EVENT MODEL INTERFACE |
1713 | =head1 SUPPLYING YOUR OWN EVENT MODEL INTERFACE |
1644 | |
1714 | |
… | |
… | |
2231 | |
2301 | |
2232 | This slightly arcane module is used to implement fast signal handling: To |
2302 | This slightly arcane module is used to implement fast signal handling: To |
2233 | my knowledge, there is no way to do completely race-free and quick |
2303 | my knowledge, there is no way to do completely race-free and quick |
2234 | signal handling in pure perl. To ensure that signals still get |
2304 | signal handling in pure perl. To ensure that signals still get |
2235 | delivered, AnyEvent will start an interval timer to wake up perl (and |
2305 | delivered, AnyEvent will start an interval timer to wake up perl (and |
2236 | catch the signals) with soemd elay (default is 10 seconds, look for |
2306 | catch the signals) with some delay (default is 10 seconds, look for |
2237 | C<$AnyEvent::MAX_SIGNAL_LATENCY>). |
2307 | C<$AnyEvent::MAX_SIGNAL_LATENCY>). |
2238 | |
2308 | |
2239 | If this module is available, then it will be used to implement signal |
2309 | If this module is available, then it will be used to implement signal |
2240 | catching, which means that signals will not be delayed, and the event loop |
2310 | catching, which means that signals will not be delayed, and the event loop |
2241 | will not be interrupted regularly, which is more efficient (And good for |
2311 | will not be interrupted regularly, which is more efficient (And good for |
2242 | battery life on laptops). |
2312 | battery life on laptops). |
2243 | |
2313 | |
2244 | This affects not just the pure-perl event loop, but also other event loops |
2314 | This affects not just the pure-perl event loop, but also other event loops |
2245 | that have no signal handling on their own (e.g. Glib, Tk, Qt). |
2315 | that have no signal handling on their own (e.g. Glib, Tk, Qt). |
|
|
2316 | |
|
|
2317 | Some event loops (POE, Event, Event::Lib) offer signal watchers natively, |
|
|
2318 | and either employ their own workarounds (POE) or use AnyEvent's workaround |
|
|
2319 | (using C<$AnyEvent::MAX_SIGNAL_LATENCY>). Installing L<Async::Interrupt> |
|
|
2320 | does nothing for those backends. |
2246 | |
2321 | |
2247 | =item L<EV> |
2322 | =item L<EV> |
2248 | |
2323 | |
2249 | This module isn't really "optional", as it is simply one of the backend |
2324 | This module isn't really "optional", as it is simply one of the backend |
2250 | event loops that AnyEvent can use. However, it is simply the best event |
2325 | event loops that AnyEvent can use. However, it is simply the best event |
… | |
… | |
2264 | |
2339 | |
2265 | =item L<JSON> and L<JSON::XS> |
2340 | =item L<JSON> and L<JSON::XS> |
2266 | |
2341 | |
2267 | This module is required when you want to read or write JSON data via |
2342 | This module is required when you want to read or write JSON data via |
2268 | L<AnyEvent::Handle>. It is also written in pure-perl, but can take |
2343 | L<AnyEvent::Handle>. It is also written in pure-perl, but can take |
2269 | advantage of the ulta-high-speed L<JSON::XS> module when it is installed. |
2344 | advantage of the ultra-high-speed L<JSON::XS> module when it is installed. |
2270 | |
2345 | |
2271 | In fact, L<AnyEvent::Handle> will use L<JSON::XS> by default if it is |
2346 | In fact, L<AnyEvent::Handle> will use L<JSON::XS> by default if it is |
2272 | installed. |
2347 | installed. |
2273 | |
2348 | |
2274 | =item L<Net::SSLeay> |
2349 | =item L<Net::SSLeay> |