Re: How to write a self.pm (Re: method calls on $self)

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 12:36:23PM +0800, Autrijus Tang wrote: : On Mon, Jul 11, 2005 at 09:04:54PM -0700, Larry Wall wrote: : > On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: : > : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: : > : The obvious thought is to have yet

Re: How to write a self.pm (Re: method calls on $self)

2005-07-12 Thread TSa (Thomas Sandlaß)
Autrijus Tang wrote: The compiler, in turn inspect whether there's an bound $_ in scope with $?SELF set. It is not trivial, because this should work: sub baz (&c) { c() } method foo { baz { .bar } } # $_ is free in inner closure But this needs to fail: sub baz (&c) { c(1) }

Re: How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Autrijus Tang
On Mon, Jul 11, 2005 at 09:04:54PM -0700, Larry Wall wrote: > On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: > : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: > : The obvious thought is to have yet another magical, $^H like flag, to > : denote the current dialect. If

Re: How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Larry Wall
On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: : The obvious thought is to have yet another magical, $^H like flag, to : denote the current dialect. If it is set, then the parser can emit : .method as $_.method, instead

How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Autrijus Tang
(Cross-posting the new ruling from p6l to p6c to discuss implementation strategy) On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: > { > let $Larry.decisive = 1; > > Okay, this is what we're gonna do. We're gonna go back pretty close to > where we were originally, but wit