in reply to how to write a modified return() call?
I wouldn't do it your intended way but do
withmy $start_with = another_value() or return mywarn("Could not get another value");
sub mywarn { warn $_ for @_; return; };
but if you're hell-bent on confusing people with your program flow, see Scope::Upper and/or Continuation::Escape, which allow you to "skip" levels as you return up the call chain.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to write a modified return() call?
by leocharre (Priest) on Jul 14, 2009 at 19:03 UTC |