… | |
… | |
1375 | require AnyEvent::Debug; |
1375 | require AnyEvent::Debug; |
1376 | AnyEvent::Debug::wrap ($ENV{PERL_ANYEVENT_DEBUG_WRAP}); |
1376 | AnyEvent::Debug::wrap ($ENV{PERL_ANYEVENT_DEBUG_WRAP}); |
1377 | } |
1377 | } |
1378 | |
1378 | |
1379 | if (exists $ENV{PERL_ANYEVENT_DEBUG_SHELL}) { |
1379 | if (exists $ENV{PERL_ANYEVENT_DEBUG_SHELL}) { |
|
|
1380 | require AnyEvent::Socket; |
1380 | require AnyEvent::Debug; |
1381 | require AnyEvent::Debug; |
1381 | #d# |
1382 | |
|
|
1383 | my ($host, $service) = AnyEvent::Socket::parse_hostport ($ENV{PERL_ANYEVENT_DEBUG_SHELL}); |
|
|
1384 | $AnyEvent::Debug::SHELL = AnyEvent::Debug::shell ($host, $service); |
1382 | } |
1385 | } |
1383 | |
1386 | |
1384 | (shift @post_detect)->() while @post_detect; |
1387 | (shift @post_detect)->() while @post_detect; |
1385 | undef @post_detect; |
1388 | undef @post_detect; |
1386 | |
1389 | |
… | |
… | |
1949 | |
1952 | |
1950 | Unlike C<use strict> (or its modern cousin, C<< use L<common::sense> |
1953 | Unlike C<use strict> (or its modern cousin, C<< use L<common::sense> |
1951 | >>, it is definitely recommended to keep it off in production. Keeping |
1954 | >>, it is definitely recommended to keep it off in production. Keeping |
1952 | C<PERL_ANYEVENT_STRICT=1> in your environment while developing programs |
1955 | C<PERL_ANYEVENT_STRICT=1> in your environment while developing programs |
1953 | can be very useful, however. |
1956 | can be very useful, however. |
|
|
1957 | |
|
|
1958 | =item C<PERL_ANYEVENT_DEBUG_SHELL> |
|
|
1959 | |
|
|
1960 | If this env variable is set, then its contents will be |
|
|
1961 | interpreted by C<AnyEvent::Socket::parse_hostport> and an |
|
|
1962 | C<AnyEvent::Debug::shell> is bound on that port. The shell object is saved |
|
|
1963 | in C<$AnyEvent::Debug::SHELL>. |
|
|
1964 | |
|
|
1965 | For example, to bind a debug shell on a unix domain socket in |
|
|
1966 | F</tmp/debug.sock>, you could use this: |
|
|
1967 | |
|
|
1968 | PERL_ANYEVENT_DEBUG_SHELL=unix/:/tmp/debug.sock perlprog |
|
|
1969 | |
|
|
1970 | =item C<PERL_ANYEVENT_DEBUG_WRAP> |
|
|
1971 | |
|
|
1972 | Can be set to C<0>, C<1> or C<2> and enables wrapping of all watchers for |
|
|
1973 | debugging purposes. See C<AnyEvent::Debug::wrap> for details. |
1954 | |
1974 | |
1955 | =item C<PERL_ANYEVENT_MODEL> |
1975 | =item C<PERL_ANYEVENT_MODEL> |
1956 | |
1976 | |
1957 | This can be used to specify the event model to be used by AnyEvent, before |
1977 | This can be used to specify the event model to be used by AnyEvent, before |
1958 | auto detection and -probing kicks in. |
1978 | auto detection and -probing kicks in. |