ежик,
Цитата(ежик @ 29.6.2006, 05:47 ) | потомучто mod_perl перехватывает exit(); а die нерекомендуется может вылететь весь перл |
скажи, ты это сам придумал?
Вот цитата из книги OReilly - Practical Mod_Perl:
| Цитата | Under mod_perl, we don't want the process to quit. Therefore, mod_perl takes care of it behind the scenes, and die( ) calls don't abort the process. When die( ) is called, mod_perl logs the error message and calls Apache::exit( ) instead of CORE::die( ). Thus, the script stops, but the process doesn't quit. Of course, we are talking about the cases where the code calling die( ) is not wrapped inside an exception handler (e.g., an eval { } block) that traps die( ) calls, or the $SIG{_ _DIE_ _} sighandler, which allows you to override the behavior of die( )...
|
Здесь идет речь о mod_perl 1. Для mod_perl 2 вместо Apache::exit( ) используется ModPerl::Util::exit($status).
Разработчики mod_perl не болваны, чтобы при die вылетал процесс Perl, поэтому они вызов die перехватывают.
|