--- AnyEvent/lib/AnyEvent.pm 2011/11/22 09:36:46 1.392 +++ AnyEvent/lib/AnyEvent.pm 2012/04/05 04:12:21 1.401 @@ -435,7 +435,7 @@ means in some cases, signals will be delayed. The maximum time a signal might be delayed is 10 seconds by default, but can be overriden via C<$ENV{PERL_ANYEVENT_MAX_SIGNAL_LATENCY}> or -C<$AnyEvent::MAX_SIGNAL_LATENCY> - see the Ö +C<$AnyEvent::MAX_SIGNAL_LATENCY> - see the L section for details. All these problems can be avoided by installing the optional @@ -1225,7 +1225,8 @@ # basically a tuned-down version of common::sense sub common_sense { - # from common:.sense 3.4 + # from common:.sense 3.5 + local $^W; ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf0\x0f\xc0\xf0\xfc\x33\x00"; # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl) $^H |= 0x00000600; @@ -1235,7 +1236,7 @@ use Carp (); -our $VERSION = '6.11'; +our $VERSION = '6.14'; our $MODEL; our @ISA; our @REGISTRY; @@ -1397,7 +1398,7 @@ # the author knows about the problems and what it does to AnyEvent as a whole # (and the ability of others to use AnyEvent), but simply wants to abuse AnyEvent # anyway. - AnyEvent::log fatal => "AnyEvent: IO::Async::Loop::AnyEvent detected - that module is broken by\n" + AnyEvent::log fatal => "IO::Async::Loop::AnyEvent detected - that module is broken by\n" . "design, abuses internals and breaks AnyEvent - will not continue." if exists $INC{"IO/Async/Loop/AnyEvent.pm"}; @@ -1418,10 +1419,10 @@ my $model = $1; $model = "AnyEvent::Impl::$model" unless $model =~ s/::$//; if (eval "require $model") { - AnyEvent::log 7 => "loaded model '$model' (forced by \$ENV{PERL_ANYEVENT_MODEL}), using it."; + AnyEvent::log 7 => "Loaded model '$model' (forced by \$ENV{PERL_ANYEVENT_MODEL}), using it."; $MODEL = $model; } else { - AnyEvent::log 4 => "unable to load model '$model' (from \$ENV{PERL_ANYEVENT_MODEL}):\n$@"; + AnyEvent::log 4 => "Unable to load model '$model' (from \$ENV{PERL_ANYEVENT_MODEL}):\n$@"; } } @@ -1431,11 +1432,11 @@ my ($package, $model) = @$_; if (${"$package\::VERSION"} > 0) { if (eval "require $model") { - AnyEvent::log 7 => "autodetected model '$model', using it."; + AnyEvent::log 7 => "Autodetected model '$model', using it."; $MODEL = $model; last; } else { - AnyEvent::log 8 => "detected event loop $package, but cannot load '$model', skipping: $@"; + AnyEvent::log 8 => "Detected event loop $package, but cannot load '$model', skipping: $@"; } } } @@ -1449,14 +1450,14 @@ and ${"$package\::VERSION"} > 0 and eval "require $model" ) { - AnyEvent::log 7 => "autoloaded model '$model', using it."; + AnyEvent::log 7 => "Autoloaded model '$model', using it."; $MODEL = $model; last; } } $MODEL - or AnyEvent::log fatal => "AnyEvent: backend autodetection failed - did you properly install AnyEvent?"; + or AnyEvent::log fatal => "Backend autodetection failed - did you properly install AnyEvent?"; } } @@ -1613,13 +1614,13 @@ *time = sub { Time::HiRes::time () }; *AE::time = \& Time::HiRes::time ; *now = \&time; - AnyEvent::log 8 => "AnyEvent: using Time::HiRes for sub-second timing accuracy."; + AnyEvent::log 8 => "using Time::HiRes for sub-second timing accuracy."; # if (eval "use POSIX (); (POSIX::times())... } else { *time = sub { CORE::time }; *AE::time = sub (){ CORE::time }; *now = \&time; - AnyEvent::log 3 => "using built-in time(), WARNING, no sub-second resolution!"; + AnyEvent::log 3 => "Using built-in time(), no sub-second resolution!"; } }; die if $@; @@ -1723,13 +1724,13 @@ eval q{ # poor man's autoloading {} # probe for availability of Async::Interrupt if (_have_async_interrupt) { - AnyEvent::log 8 => "using Async::Interrupt for race-free signal handling."; + AnyEvent::log 8 => "Using Async::Interrupt for race-free signal handling."; $SIGPIPE_R = new Async::Interrupt::EventPipe; $SIG_IO = AE::io $SIGPIPE_R->fileno, 0, \&_signal_exec; } else { - AnyEvent::log 8 => "using emulated perl signal handling with latency timer."; + AnyEvent::log 8 => "Using emulated perl signal handling with latency timer."; if (AnyEvent::WIN32) { require AnyEvent::Util; @@ -2075,28 +2076,28 @@ =item C -By default, AnyEvent will only log messages with loglevel C<3> -(C) or higher (see L). You can set this -environment variable to a numerical loglevel to make AnyEvent more (or -less) talkative. +By default, AnyEvent will log messages with loglevel C<4> (C) or +higher (see L). You can set this environment variable to a +numerical loglevel to make AnyEvent more (or less) talkative. If you want to do more than just set the global logging level you should have a look at C, which allows much more complex specifications. When set to C<0> (C), then no messages whatsoever will be logged with -the default logging settings. +everything else at defaults. -When set to C<5> or higher (C), causes AnyEvent to warn about -unexpected conditions, such as not being able to load the event model -specified by C, or a guard callback throwing an -exception - this is the minimum recommended level. +When set to C<5> or higher (C), AnyEvent warns about unexpected +conditions, such as not being able to load the event model specified by +C, or a guard callback throwing an exception - this +is the minimum recommended level for use during development. -When set to C<7> or higher (info), cause AnyEvent to report which event model it +When set to C<7> or higher (info), AnyEvent reports which event model it chooses. -When set to C<8> or higher (debug), then AnyEvent will report extra information on -which optional modules it loads and how it implements certain features. +When set to C<8> or higher (debug), then AnyEvent will report extra +information on which optional modules it loads and how it implements +certain features. =item C @@ -2113,8 +2114,8 @@ Note that specifying this environment variable causes the L module to be loaded, while C does not, so only -using the latter saves a few hundred kB of memory until the first message -is being logged. +using the latter saves a few hundred kB of memory unless a module +explicitly needs the extra features of AnyEvent::Log. =item C @@ -2179,6 +2180,14 @@ PERL_ANYEVENT_MODEL=Perl perl ... +=item C + +The current file I/O model - see L for more info. + +At the moment, only C (small, pure-perl, synchronous) and +C (truly asynchronous) are supported. The default is C if +L can be loaded, otherwise it is C. + =item C Used by both L and L to determine preferences @@ -3006,6 +3015,8 @@ Non-blocking handles, pipes, stream sockets, TCP clients and servers: L, L, L. +Asynchronous File I/O: L. + Asynchronous DNS: L. Thread support: L, L, L, L. @@ -3017,7 +3028,7 @@ =head1 AUTHOR Marc Lehmann - http://home.schmorp.de/ + http://software.schmorp.de/pkg/AnyEvent.html =cut