On Mon, Feb 10, 2003 at 08:44:08PM -0000, Yitzchak Scott-Thoennes wrote: > BEGIN { local $@; die 'foo' } seems to bail out of the BEGIN, but doesn't > actually die, as if the BEGIN was an eval. The code in Perl_call_list checks for the length of ERRGV ( aka $@ ), and if this is zero, thinks all is OK and continues running the script. (see perl.c:3958). There is no other way to catch an exception than checking if ERRGV isn't clear. Localizing it makes, of course, any exception un-catchable. Are there any documentation that suggests that BEGIN { local $@; die ' ... ' } should die silently or something like that ? I ask it because many core modules seems to assume it and it actually _never_ worked like that. That assumption seems to cause lots of problems. Thanks & Regards AdiThread Previous