Re: 'next', 'last' out of subroutine

John Williams <[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."

~ John Williams




-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.