From: "JupiterHost.Net" <[EMAIL PROTECTED]>
> Thanks, I'm not looking for how to handle a condition necessarily.
>
> I want to be able to:
>
> log_error_and_return($error, @return) if $whatever;
>
> instead of
>
> if($whatever) {
> log_error();
> carp $error;
> return @return;
> }
>
> basically I want to override return to log and carp first, every time
> its called.
make sure log() returns true and
log($error) and return @return if $whatever;
no need for any sneaky hidden returns.
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>