Re: 'next', 'last' out of subroutine
"Jonathan Swartz" <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
> On Thu, 29 Apr 2004, Jonathan Swartz wrote:
> > A pretty easy "fix" would be to surround the component-calling code in
> > Request::comp with a useless loop:
> >
> > eval {
> > foreach my $i (undef) {
> > # call $comp->run
> > }
> > }
>
> This should work just as well.
>
> eval {
> {
> # call $comp->run
> };
> };
>
> "A BLOCK by itself (labeled or not) is semantically equivalent to a loop
> that executes once. Thus you can use any of the loop control statements
> in it to leave or restart the block."
That's great! Even less filling. Thanks.
Jon
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click