On 4/18/07, Allison Randal <[EMAIL PROTECTED]> wrote:
Alek Storm wrote: >> > >> > So, that still means :method can mean two different things, depending >> > on whether :vtable is present or not. That's still bad. >> >> How so? Without :vtable, :method adds a method to the class. With >> :vtable, :method adds a method to the class. > > Without :vtable, :method adds a method to the class. With :vtable, > :method doesn't add a method to the class - it makes the sub visible. > Two completely different things. You've misunderstood how the features work. Vtables and methods are stored separately from each other. Both :vtable and :method say "this code entity isn't a subroutine, and isn't visible as a subroutine".
I understand entirely how both features work. I should, as I implemented large sections of the code dealing with vtable overriding. Perhaps you should check the code, because they are *not* stored separately from each other. In the current revision, :vtable and :method used together stores the sub as a vtable entry and as a visible method. Adding :anon detaches it from the namespace. For the new PDD15 implementation, once #42406 and #42407 are committed, I plan to rework how they're stored internally, but that isn't relevant to our discussion of the interface. In my previous posts, I was talking about what you proposed earlier, which I won't go over here, because it's in your earlier post. If I didn't make the distinction clear, I apologize. -- Alek Storm