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.382 by root, Thu Sep 1 23:46:26 2011 UTC vs.
Revision 1.383 by root, Fri Sep 2 04:41:16 2011 UTC

2095C<PERL_ANYEVENT_STRICT=1> in your environment while developing programs 2095C<PERL_ANYEVENT_STRICT=1> in your environment while developing programs
2096can be very useful, however. 2096can be very useful, however.
2097 2097
2098=item C<PERL_ANYEVENT_DEBUG_SHELL> 2098=item C<PERL_ANYEVENT_DEBUG_SHELL>
2099 2099
2100If this env variable is set, then its contents will be interpreted by 2100If this env variable is nonempty, then its contents will be interpreted by
2101C<AnyEvent::Socket::parse_hostport> (after replacing every occurance of 2101C<AnyEvent::Socket::parse_hostport> and C<AnyEvent::Debug::shell> (after
2102C<$$> by the process pid) and an C<AnyEvent::Debug::shell> is bound on 2102replacing every occurance of C<$$> by the process pid). The shell object
2103that port. The shell object is saved in C<$AnyEvent::Debug::SHELL>. 2103is saved in C<$AnyEvent::Debug::SHELL>.
2104 2104
2105This happens when the first watcher is created. 2105This happens when the first watcher is created.
2106 2106
2107For example, to bind a debug shell on a unix domain socket in 2107For example, to bind a debug shell on a unix domain socket in
2108F<< /tmp/debug<pid>.sock >>, you could use this: 2108F<< /tmp/debug<pid>.sock >>, you could use this:
2109 2109
2110 PERL_ANYEVENT_DEBUG_SHELL=/tmp/debug\$\$.sock perlprog 2110 PERL_ANYEVENT_DEBUG_SHELL=/tmp/debug\$\$.sock perlprog
2111 # connect with e.g.: socat readline /tmp/debug123.sock
2111 2112
2113Or to bind to tcp port 4545 on localhost:
2114
2115 PERL_ANYEVENT_DEBUG_SHELL=127.0.0.1:4545 perlprog
2116 # connect with e.g.: telnet localhost 4545
2117
2112Note that creating sockets in F</tmp> is very unsafe on multiuser 2118Note that creating sockets in F</tmp> or on localhost is very unsafe on
2113systems. 2119multiuser systems.
2114 2120
2115=item C<PERL_ANYEVENT_DEBUG_WRAP> 2121=item C<PERL_ANYEVENT_DEBUG_WRAP>
2116 2122
2117Can be set to C<0>, C<1> or C<2> and enables wrapping of all watchers for 2123Can be set to C<0>, C<1> or C<2> and enables wrapping of all watchers for
2118debugging purposes. See C<AnyEvent::Debug::wrap> for details. 2124debugging purposes. See C<AnyEvent::Debug::wrap> for details.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines