Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $foo;
eval { my $foo = bar->something() }; die $@ if $@;
return $foo;
i.e. catching and rethrowing an exception at the same time as returning the return value is no exceptions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: eval and return values
by Bloodnok (Vicar) on Jan 14, 2009 at 12:41 UTC | |
by AnomalousMonk (Archbishop) on Jan 14, 2009 at 20:16 UTC | |
|
Re: eval and return values
by jplindstrom (Monsignor) on Jan 14, 2009 at 12:44 UTC | |
|
Re: eval and return values
by puudeli (Pilgrim) on Jan 14, 2009 at 12:44 UTC | |
|
Re: eval and return values
by JavaFan (Canon) on Jan 14, 2009 at 13:22 UTC |