in reply to goto with some arguments
I'd normally write that using an exception. Exception::Class is a particularly nice way to get where you're going with that.
use Exception::Class ( SomethingException => { fields => [qw/error_code error_msg/] }, ); .... much later if ($this_is_not_right) { SomethingException->throw( error_code => 123, error_msg => 'this is error' ); }
Seeking Green geeks in Minnesota
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: goto with some arguments
by pg (Canon) on Mar 17, 2003 at 03:41 UTC | |
by larsen (Parson) on Mar 17, 2003 at 09:05 UTC | |
by zby (Vicar) on Mar 17, 2003 at 08:46 UTC | |
by jordanh (Chaplain) on Mar 17, 2003 at 18:30 UTC |