Another Caveat
- Remember - $@ is cleared every time eval is used
- Copy it before doing stuff:
if (my $exc = $@)
{
do_something();
handle_exception($exc);
}
- Because do_something() might use eval or call code which uses eval
- This is doubly important if do_something() might invoke some other module's code