> while($x) > { > $y += foo($x); > $x = bar($x); > $big_global_variable = analyze($y,$x); > } > > This leaves you with three variables that may or may not be dependent > on the upper scope for resolution by default. As the RFC is written, only *anonymous* blocks are auto-scoped, because as you note dividing things up based on if/while/etc seldom makes sense. As Graham wrote, this is of debateable usefulness. It's good if you like to write blocks inline to partition code off, but many people don't do this. "use scope 'blocks'" may get the axe if there's a v2. -Nate
- RFC 64 (v1) New pragma 'scope' to change Perl's defa Perl6 RFC Librarian
- Re: RFC 64 (v1) New pragma 'scope' to change Perl... Graham Barr
- Re: RFC 64 (v1) New pragma 'scope' to change ... Nathan Wiger
- Re: RFC 64 (v1) New pragma 'scope' to cha... Ariel Scolnicov
- Re: RFC 64 (v1) New pragma 'scope' to... Nathan Wiger
- Re: RFC 64 (v1) New pragma 'scop... Ariel Scolnicov
- Re: RFC 64 (v1) New pragma '... John Porter
- Re: RFC 64 (v1) New pragma '... Nathan Wiger
- Re: RFC 64 (v1) New pragma 'scope' to cha... Bryan C . Warnock
- Re: RFC 64 (v1) New pragma 'scope' to... Nathan Wiger
- Re: RFC 64 (v1) New pragma 'scope' to change ... Michael Mathews
- Re: RFC 64 (v1) New pragma 'scope' to change ... Bart Lateur