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
In reply to Re: goto with some arguments
by diotalevi
in thread goto with some arguments
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |