Nicholas Clark wrote: > on the other hand, I'll argue the other side that > > { > my $flag > open FOO, "<bar" ? $flag=1 : die "aargh $!"; > ... > } > post { > close FOO if $flag; > } > > is clearer because the tidy up doesn't visually get in the way of the flow > of what you're doing, and you can see what $flag is meant to be How is $flag=1 clearer than POST{close FOO;&dropLock} in this example? I don't think the consistency issue is strong enough. We are also being inconsistent by not suggesting a PRE which would be analogous to BEGIN and would run at the beginning of a sub even though it is defined halfway into it. For interior blocks, a label would be used to say which block we're firing after. Or we always use sub blocks and that's that.
- Re: assign to magic name-of-function variab... Peter Scott
- Re: assign to magic name-of-function variab... John Porter
- Re: assign to magic name-of-function variab... Peter Scott
- Re: assign to magic name-of-function variab... David L. Nicol
- Re: assign to magic name-of-function variab... John Porter
- Re: assign to magic name-of-function variab... Peter Scott
- Re: assign to magic name-of-function variab... David L. Nicol
- Re: assign to magic name-of-function variab... Nicholas Clark
- POST blocks (like END, but in a sub or sub-... David L. Nicol
- Re: POST blocks (like END, but in a sub or ... Nicholas Clark
- Re: POST blocks (like END, but in a sub or ... David L. Nicol
- Re: POST blocks (like END, but in a sub or ... Nicholas Clark
- Re: POST blocks (like END, but in a sub or ... Bart Lateur
- Re: POST blocks (like END, but in a sub or ... John Porter
- Re: POST blocks (like END, but in a sub or ... John Porter
- Re: assign to magic name-of-function variab... Glenn Linderman
- Re: assign to magic name-of-function variable i... Glenn Linderman
- Re: assign to magic name-of-function variable i... Johan Vromans
- Re: assign to magic name-of-function variable inste... Jarkko Hietaniemi
- Re: assign to magic name-of-function variable instead of... Bart Lateur
- Re: assign to magic name-of-function variable inste... Johan Vromans