in reply to Rethrowing with die $@ considered harmful
Rethrowing an exception with die $@ if (some expression involving $@) (an idiom mentioned at least 6 times in the perl documentation) has a problem when the expression involving $@ ends up doing anything that inadvertently clears $@.
I would consider inadvertently clearing $@ (or $!) as harmful, not the rethrowing.
When you ask for problems, you get them. E.g. if you overload, you should know what you are doing...
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Rethrowing with die $@ considered harmful
by adrianh (Chancellor) on Jul 18, 2006 at 08:04 UTC | |
by shmem (Chancellor) on Jul 18, 2006 at 08:21 UTC | |
by adrianh (Chancellor) on Aug 01, 2006 at 06:23 UTC | |
by xdg (Monsignor) on Jul 18, 2006 at 11:25 UTC |