On Tuesday 08 May 2007 15:02:34 Alek Storm wrote:

> No, with :vtable you define a sub of any name and use the :vtable
> attribute, specifying which vtable method it overrides if the name doesn't
> match the vtable name.  Then you create a Class PMC and call 'add_method'
> on it, passing the name, sub, flag that it's a vtable method, and flag that
> it's anonymous.  However, since it's anonymous, the name parameter doesn't
> matter.

If I've already defined the sub, with a name, presumably in a namespace, and 
marked it with :vtable, why do I have to play the games by getting a Class 
PMC and calling methods on it?  I presume in this case I also have to 
*remove* it from the namespace if I don't want it to be there too, right?

That does not seem like an improvement over the current approach where merely 
putting the :vtable attribute on a subroutine does the right thing.

-- c

Reply via email to