On Thu, Jan 20, 2011 at 2:28 PM, chromatic <chromatic@wgz.org> wrote: > * grabbing the optree *already generated* for the body of the sub > * creating a new lexical $self binding in that optree > * rummaging through every variable access in that entire optree to find $self, > if it exists This is why I was pondering a "self" keyword. If it could access the right reference at runtime you wouldn't need to worry about the existing bindings. Imagine: * method { ... } somehow marks the subroutine body as a method * dispatch to such a marked method doesn't put the invocant in @_ but puts it "somewhere else" (big hand-waving here) * keyword self retrieves invocant from wherever it got put I leave it to people who know the guts in detail to explain why that is doomed to fail. :-) -- DavidThread Previous | Thread Next