… | |
… | |
1318 | # all autoloaded methods reserve the complete glob, not just the method slot. |
1318 | # all autoloaded methods reserve the complete glob, not just the method slot. |
1319 | # due to bugs in perls method cache implementation. |
1319 | # due to bugs in perls method cache implementation. |
1320 | our @methods = qw(io timer time now now_update signal child idle condvar); |
1320 | our @methods = qw(io timer time now now_update signal child idle condvar); |
1321 | |
1321 | |
1322 | sub detect() { |
1322 | sub detect() { |
|
|
1323 | return $MODEL if $MODEL; # some programs keep references to detect |
|
|
1324 | |
1323 | local $!; # for good measure |
1325 | local $!; # for good measure |
1324 | local $SIG{__DIE__}; # we use eval |
1326 | local $SIG{__DIE__}; # we use eval |
1325 | |
1327 | |
1326 | # free some memory |
1328 | # free some memory |
1327 | *detect = sub () { $MODEL }; |
1329 | *detect = sub () { $MODEL }; |