in reply to Re: subroutine prototypes still bad?
in thread subroutine prototypes still bad?
That's actually a good example of why prototypes are *bad*. It looks so much like normal Perl code, one might be tempted to return from the catch block.
sub { try { ... } catch Exception with { return 0; }; return 1; }
However, a return in catch block only exits the catch block! The above function would always return 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: subroutine prototypes still bad?
by dmitri (Priest) on Jun 13, 2007 at 14:09 UTC | |
by ikegami (Patriarch) on Jun 13, 2007 at 14:19 UTC | |
by dmitri (Priest) on Jun 13, 2007 at 16:50 UTC |