develooper Front page | perl.perl6.language | Postings from February 2001

Re: assign to magic name-of-function variable instead of "return"

Thread Previous | Thread Next
From:
John Porter
Date:
February 7, 2001 11:17
Subject:
Re: assign to magic name-of-function variable instead of "return"
Message ID:
20010207141751.C8667@min.net
Peter Scott wrote:
> 
> I want the 'try' there for my sake, not Perl's; ... it
> helps alert me that the following block is subject to non-local control 
> flow rules.

Huh? Down that road lies the Java madness.

	eval {
		foo();
	};

	sub foo {
		bar();
	}

	sub bar {
		die $barney;
	}

All three of these blocks are "subject to non-local control flow rules",
including the body of foo.

-- 
John Porter


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About