in reply to Re^4: Why eval {...};if ($@) { die $@ } else { ...???
in thread Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???
Well. As you know, the eval BLOCK is good for not dying. The eval BLOCK; die $@ if $@ is good for dying somewhere else, and not inside the code that's in the eval BLOCK. I don't know the specifics of that module you are talking about, but I've provided a simple example which shows the difference, even not adding anything to the argument to die but $@.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Why eval {...};if ($@) { die $@ } else { ...???
by Jenda (Abbot) on Apr 04, 2009 at 00:45 UTC |