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.366 by root, Wed Aug 17 02:02:38 2011 UTC vs.
Revision 1.367 by root, Wed Aug 17 02:14:17 2011 UTC

1055 1055
1056Log the given C<$msg> at the given C<$level>. 1056Log the given C<$msg> at the given C<$level>.
1057 1057
1058Loads AnyEvent::Log on first use and calls C<AnyEvent::Log::log> - 1058Loads AnyEvent::Log on first use and calls C<AnyEvent::Log::log> -
1059consequently, look at the L<AnyEvent::Log> documentation for details. 1059consequently, look at the L<AnyEvent::Log> documentation for details.
1060
1061If you want to sprinkle loads of logging calls around your code, consider
1062creating a logger callback with the C<AnyEvent::Log::logger< function.
1060 1063
1061=back 1064=back
1062 1065
1063=head1 WHAT TO DO IN A MODULE 1066=head1 WHAT TO DO IN A MODULE
1064 1067
1408 if defined &{"$MODEL\::$_"}; 1411 if defined &{"$MODEL\::$_"};
1409 } 1412 }
1410 1413
1411 _isa_set; 1414 _isa_set;
1412 1415
1416 # we're officially open!
1417
1413 if ($ENV{PERL_ANYEVENT_STRICT}) { 1418 if ($ENV{PERL_ANYEVENT_STRICT}) {
1414 require AnyEvent::Strict; 1419 require AnyEvent::Strict;
1415 } 1420 }
1416 1421
1417 if ($ENV{PERL_ANYEVENT_DEBUG_WRAP}) { 1422 if ($ENV{PERL_ANYEVENT_DEBUG_WRAP}) {
1427 $shell =~ s/\$\$/$$/g; 1432 $shell =~ s/\$\$/$$/g;
1428 1433
1429 my ($host, $service) = AnyEvent::Socket::parse_hostport ($shell); 1434 my ($host, $service) = AnyEvent::Socket::parse_hostport ($shell);
1430 $AnyEvent::Debug::SHELL = AnyEvent::Debug::shell ($host, $service); 1435 $AnyEvent::Debug::SHELL = AnyEvent::Debug::shell ($host, $service);
1431 } 1436 }
1437
1438 # now the anyevent environment is set up as the user told us to, so
1439 # call the actual user code - post detects
1432 1440
1433 (shift @post_detect)->() while @post_detect; 1441 (shift @post_detect)->() while @post_detect;
1434 undef @post_detect; 1442 undef @post_detect;
1435 1443
1436 *post_detect = sub(&) { 1444 *post_detect = sub(&) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines