--- AnyEvent/lib/AnyEvent.pm 2008/05/11 18:08:36 1.118 +++ AnyEvent/lib/AnyEvent.pm 2008/05/23 23:37:13 1.125 @@ -1,4 +1,4 @@ -=head1 NAME +=head1 => NAME AnyEvent - provide framework for multiple event loops @@ -633,14 +633,19 @@ Provide read and write buffers and manages watchers for reads and writes. +=item L + +Provides various utility functions for (internet protocol) sockets, +addresses and name resolution. Also functions to create non-blocking tcp +connections or tcp servers, with IPv6 and SRV record support and more. + =item L Provides a simple web application server framework. =item L -Provides asynchronous DNS resolver capabilities, beyond what -L offers. +Provides rich asynchronous DNS resolver capabilities. =item L @@ -693,7 +698,7 @@ use Carp; -our $VERSION = '3.41'; +our $VERSION = '3.6'; our $MODEL; our $AUTOLOAD; @@ -732,12 +737,12 @@ push @post_detect, $cb; defined wantarray - ? bless \$cb, "AnyEvent::Util::Guard" + ? bless \$cb, "AnyEvent::Util::PostDetect" : () } } -sub AnyEvent::Util::Guard::DESTROY { +sub AnyEvent::Util::PostDetect::DESTROY { @post_detect = grep $_ != ${$_[0]}, @post_detect; } @@ -813,7 +818,7 @@ # default implementation for ->condvar sub condvar { - bless {}, AnyEvent::CondVar:: + bless { @_ == 3 ? (_ae_cb => $_[2]) : () }, AnyEvent::CondVar:: } # default implementation for ->signal @@ -946,7 +951,7 @@ sub end { return if --$_[0]{_ae_counter}; - &{ $_[0]{_ae_end_cb} } if $_[0]{_ae_end_cb}; + &{ $_[0]{_ae_end_cb} || sub { $_[0]->send } }; } # undocumented/compatibility with pre-3.4 @@ -1031,6 +1036,23 @@ PERL_ANYEVENT_MODEL=Perl perl ... +=item C + +Used by both L and L to determine preferences +for IPv4 or IPv6. The default is unspecified (and might change, or be the result +of autoprobing). + +Must be set to a comma-separated list of protocols or address families, +current supported: C and C. Only protocols mentioned will be +used, and preference will be given to protocols mentioned earlier in the +list. + +Examples: C - prefer IPv4 over IPv6, +but support both and try to use both. C +- only support IPv4, never try to resolve or contact IPv6 +addressses. C support either IPv4 or +IPv6, but prefer IPv6 over IPv4. + =back =head1 EXAMPLE PROGRAM @@ -1489,6 +1511,8 @@ =head1 SEE ALSO +Utility functions: L. + Event modules: L, L, L, L, L, L, L, L, L, L. @@ -1497,9 +1521,14 @@ L, L, L. +Non-blocking file handles, sockets, TCP clients and +servers: L, L. + +Asynchronous DNS: L. + Coroutine support: L, L, L, L, -Nontrivial usage examples: L, L. +Nontrivial usage examples: L, L, L. =head1 AUTHOR