--- AnyEvent/lib/AnyEvent.pm 2008/05/31 01:41:22 1.149 +++ AnyEvent/lib/AnyEvent.pm 2008/07/04 12:25:44 1.163 @@ -1,4 +1,4 @@ -=head1 => NAME +=head1 NAME AnyEvent - provide framework for multiple event loops @@ -140,10 +140,10 @@ An any way to achieve that is this pattern: - my $w; $w = AnyEvent->type (arg => value ..., cb => sub { - # you can use $w here, for example to undef it - undef $w; - }); + my $w; $w = AnyEvent->type (arg => value ..., cb => sub { + # you can use $w here, for example to undef it + undef $w; + }); Note that C combination. This is necessary because in Perl, my variables are only visible after the statement in which they are @@ -354,21 +354,21 @@ Example: fork a process and wait for it - my $done = AnyEvent->condvar; - - my $pid = fork or exit 5; - - my $w = AnyEvent->child ( - pid => $pid, - cb => sub { - my ($pid, $status) = @_; - warn "pid $pid exited with status $status"; - $done->send; - }, - ); - - # do something else, then wait for process exit - $done->recv; + my $done = AnyEvent->condvar; + + my $pid = fork or exit 5; + + my $w = AnyEvent->child ( + pid => $pid, + cb => sub { + my ($pid, $status) = @_; + warn "pid $pid exited with status $status"; + $done->send; + }, + ); + + # do something else, then wait for process exit + $done->recv; =head2 CONDITION VARIABLES @@ -754,6 +754,11 @@ Provides rich asynchronous DNS resolver capabilities. +=item L + +A simple-to-use HTTP library that is capable of making a lot of concurrent +HTTP requests. + =item L Provides a simple web application server framework. @@ -762,6 +767,10 @@ The fastest ping in the west. +=item L + +Executes DBI requests asynchronously in a proxy process. + =item L AnyEvent based IRC client module family. @@ -809,7 +818,7 @@ use Carp; -our $VERSION = 4.11; +our $VERSION = 4.161; our $MODEL; our $AUTOLOAD; @@ -981,7 +990,7 @@ delete $SIG_CB{$signal}{$cb}; - $SIG{$signal} = 'DEFAULT' unless keys %{ $SIG_CB{$signal} }; + delete $SIG{$signal} unless keys %{ $SIG_CB{$signal} }; } # default implementation for ->child @@ -1175,7 +1184,7 @@ For example, to force the pure perl model (L) you could start your program like this: - PERL_ANYEVENT_MODEL=Perl perl ... + PERL_ANYEVENT_MODEL=Perl perl ... =item C @@ -1660,15 +1669,24 @@ You can make AnyEvent completely ignore this variable by deleting it before the first watcher gets created, e.g. with a C block: - BEGIN { delete $ENV{PERL_ANYEVENT_MODEL} } - - use AnyEvent; + BEGIN { delete $ENV{PERL_ANYEVENT_MODEL} } + + use AnyEvent; Similar considerations apply to $ENV{PERL_ANYEVENT_VERBOSE}, as that can be used to probe what backend is used and gain other information (which is probably even less useful to an attacker than PERL_ANYEVENT_MODEL). +=head1 BUGS + +Perl 5.8 has numerous memleaks that sometimes hit this module and are hard +to work around. If you suffer from memleaks, first upgrade to Perl 5.10 +and check wether the leaks still show up. (Perl 5.10.0 has other annoying +mamleaks, such as leaking on C and C but it is usually not as +pronounced). + + =head1 SEE ALSO Utility functions: L. @@ -1693,8 +1711,8 @@ =head1 AUTHOR - Marc Lehmann - http://home.schmorp.de/ + Marc Lehmann + http://home.schmorp.de/ =cut