ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.393 by root, Mon Dec 12 12:21:47 2011 UTC vs.
Revision 1.397 by root, Thu Mar 22 18:00:35 2012 UTC

433as you cannot do race-free signal handling in perl, requiring 433as you cannot do race-free signal handling in perl, requiring
434C libraries for this. AnyEvent will try to do its best, which 434C libraries for this. AnyEvent will try to do its best, which
435means in some cases, signals will be delayed. The maximum time 435means in some cases, signals will be delayed. The maximum time
436a signal might be delayed is 10 seconds by default, but can 436a signal might be delayed is 10 seconds by default, but can
437be overriden via C<$ENV{PERL_ANYEVENT_MAX_SIGNAL_LATENCY}> or 437be overriden via C<$ENV{PERL_ANYEVENT_MAX_SIGNAL_LATENCY}> or
438C<$AnyEvent::MAX_SIGNAL_LATENCY> - see the Ö<ENVIRONMENT VARIABLES> 438C<$AnyEvent::MAX_SIGNAL_LATENCY> - see the L<ENVIRONMENT VARIABLES>
439section for details. 439section for details.
440 440
441All these problems can be avoided by installing the optional 441All these problems can be avoided by installing the optional
442L<Async::Interrupt> module, which works with most event loops. It will not 442L<Async::Interrupt> module, which works with most event loops. It will not
443work with inherently broken event loops such as L<Event> or L<Event::Lib> 443work with inherently broken event loops such as L<Event> or L<Event::Lib>
1233 1233
1234BEGIN { AnyEvent::common_sense } 1234BEGIN { AnyEvent::common_sense }
1235 1235
1236use Carp (); 1236use Carp ();
1237 1237
1238our $VERSION = '6.12'; 1238our $VERSION = '6.14';
1239our $MODEL; 1239our $MODEL;
1240our @ISA; 1240our @ISA;
1241our @REGISTRY; 1241our @REGISTRY;
1242our $VERBOSE; 1242our $VERBOSE;
1243our %PROTOCOL; # (ipv4|ipv6) => (1|2), higher numbers are preferred 1243our %PROTOCOL; # (ipv4|ipv6) => (1|2), higher numbers are preferred
2073 2073
2074=over 4 2074=over 4
2075 2075
2076=item C<PERL_ANYEVENT_VERBOSE> 2076=item C<PERL_ANYEVENT_VERBOSE>
2077 2077
2078By default, AnyEvent will only log messages with loglevel C<3> 2078By default, AnyEvent will log messages with loglevel C<4> (C<error>) or
2079(C<critical>) or higher (see L<AnyEvent::Log>). You can set this 2079higher (see L<AnyEvent::Log>). You can set this environment variable to a
2080environment variable to a numerical loglevel to make AnyEvent more (or 2080numerical loglevel to make AnyEvent more (or less) talkative.
2081less) talkative.
2082 2081
2083If you want to do more than just set the global logging level 2082If you want to do more than just set the global logging level
2084you should have a look at C<PERL_ANYEVENT_LOG>, which allows much more 2083you should have a look at C<PERL_ANYEVENT_LOG>, which allows much more
2085complex specifications. 2084complex specifications.
2086 2085
2087When set to C<0> (C<off>), then no messages whatsoever will be logged with 2086When set to C<0> (C<off>), then no messages whatsoever will be logged with
2088the default logging settings. 2087everything else at defaults.
2089 2088
2090When set to C<5> or higher (C<warn>), causes AnyEvent to warn about 2089When set to C<5> or higher (C<warn>), AnyEvent warns about unexpected
2091unexpected conditions, such as not being able to load the event model 2090conditions, such as not being able to load the event model specified by
2092specified by C<PERL_ANYEVENT_MODEL>, or a guard callback throwing an 2091C<PERL_ANYEVENT_MODEL>, or a guard callback throwing an exception - this
2093exception - this is the minimum recommended level. 2092is the minimum recommended level for use during development.
2094 2093
2095When set to C<7> or higher (info), cause AnyEvent to report which event model it 2094When set to C<7> or higher (info), AnyEvent reports which event model it
2096chooses. 2095chooses.
2097 2096
2098When set to C<8> or higher (debug), then AnyEvent will report extra information on 2097When set to C<8> or higher (debug), then AnyEvent will report extra
2099which optional modules it loads and how it implements certain features. 2098information on which optional modules it loads and how it implements
2099certain features.
2100 2100
2101=item C<PERL_ANYEVENT_LOG> 2101=item C<PERL_ANYEVENT_LOG>
2102 2102
2103Accepts rather complex logging specifications. For example, you could log 2103Accepts rather complex logging specifications. For example, you could log
2104all C<debug> messages of some module to stderr, warnings and above to 2104all C<debug> messages of some module to stderr, warnings and above to
2111This variable is evaluated when AnyEvent (or L<AnyEvent::Log>) is loaded, 2111This variable is evaluated when AnyEvent (or L<AnyEvent::Log>) is loaded,
2112so will take effect even before AnyEvent has initialised itself. 2112so will take effect even before AnyEvent has initialised itself.
2113 2113
2114Note that specifying this environment variable causes the L<AnyEvent::Log> 2114Note that specifying this environment variable causes the L<AnyEvent::Log>
2115module to be loaded, while C<PERL_ANYEVENT_VERBOSE> does not, so only 2115module to be loaded, while C<PERL_ANYEVENT_VERBOSE> does not, so only
2116using the latter saves a few hundred kB of memory until the first message 2116using the latter saves a few hundred kB of memory unless a module
2117is being logged. 2117explicitly needs the extra features of AnyEvent::Log.
2118 2118
2119=item C<PERL_ANYEVENT_STRICT> 2119=item C<PERL_ANYEVENT_STRICT>
2120 2120
2121AnyEvent does not do much argument checking by default, as thorough 2121AnyEvent does not do much argument checking by default, as thorough
2122argument checking is very costly. Setting this variable to a true value 2122argument checking is very costly. Setting this variable to a true value

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines