Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-08 Thread Carl Mäsak
Daniel (), Carl (): The above reasoning raises the following question for me: how do I return from a sub or a method from within a map block? I suppose what you want can be achieved with last, it probably should work in map as well, since map and for are synonims... That is all good and well

Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-08 Thread Daniel Ruoso
Em Dom, 2008-12-07 às 18:10 +0100, Carl Mäsak escreveu: The above reasoning raises the following question for me: how do I return from a sub or a method from within a map block? I suppose what you want can be achieved with last, it probably should work in map as well, since map and for are

Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-08 Thread Daniel Ruoso
Em Seg, 2008-12-08 às 12:08 +0100, Carl Mäsak escreveu: Daniel (), Carl (): That is all good and well for exiting the map itself; but what I want to achieve is to exit the surrounding sub or method block. Example: Er... I mean actually the opposite... it should always return from the

[perl #61130] :nth() does not work with :x() or :g in .subst in Rakudo

2008-12-08 Thread Moritz Lenz via RT
On Sun Dec 07 07:24:07 2008, masak wrote: The .subst method in Rakudo r33599 can understand :x()... $ perl6 -e 'say foo1foo2foo3foo4.subst(foo, bar, :x(2))' # yes bar1bar2foo3foo4 ...and :nth()... $ perl6 -e 'say foo1foo2foo3foo4.subst(foo, bar, :nth(2))' # yes foo1bar2foo3foo4

Re: [perl #61130] :nth() does not work with :x() or :g in .subst in Rakudo

2008-12-08 Thread Patrick R. Michaud
On Sun, Dec 07, 2008 at 03:09:30PM -0800, Moritz Lenz via RT wrote: ...but not :x() together with :nth()... $ perl6 -e 'say foo1foo2foo3foo4.subst(foo, bar, :x(2), :nth(2))' # expected foo1bar2foo3bar4 foo1bar2foo3foo4 The above are my personal expectations. The current version of

Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-08 Thread Carl Mäsak
Daniel (), Carl (): That is all good and well for exiting the map itself; but what I want to achieve is to exit the surrounding sub or method block. Example: Er... I mean actually the opposite... it should always return from the surrounding sub or method, never only from map, if you want to

Re: Files, Directories, Resources, Operating Systems

2008-12-08 Thread Aristotle Pagaltzis
* Mark Overmeer [EMAIL PROTECTED] [2008-12-07 14:20]: So why are you all so hessitating in making each other's life easier? There is no 100% solution, but 0% is even worse! It looks like Python 3000 just tried that. People are not happy about it:

Re: Files, Directories, Resources, Operating Systems

2008-12-08 Thread Leon Timmermans
On Mon, Dec 8, 2008 at 8:16 PM, Aristotle Pagaltzis [EMAIL PROTECTED] wrote: It looks like Python 3000 just tried that. People are not happy about it: http://utcc.utoronto.ca/~cks/space/blog/python/OsListdirProblem Yeeh, I also noted exactly that problem when reading the What's New In Python

Re: Files, Directories, Resources, Operating Systems

2008-12-08 Thread Mark Overmeer
* Aristotle Pagaltzis ([EMAIL PROTECTED]) [081208 19:16]: * Mark Overmeer [EMAIL PROTECTED] [2008-12-07 14:20]: So why are you all so hessitating in making each other's life easier? There is no 100% solution, but 0% is even worse! It looks like Python 3000 just tried that. People are not

Out of CONTROL...?

2008-12-08 Thread Patrick R. Michaud
A very interesting question came up on #perl today, so I'm forwarding it to p6l for discussion/decision. Given the following code: sub foo() { return 1; } sub bar() { warn oops; } { CONTROL { ... } foo(); bar(); } S04 seems to clearly indicate that