Here's the original post where I gave the rationale for making the flags work as they do:

<http://groups.google.com/group/perl.perl6.internals/browse_thread/thread/5bbf1eab0133d467?tvc=2>

I'm comfortable with a modification saying that :vtable always gets the 'self' parameter like :method does. But without :method, :vtable should not make an entry in the namespace of the class, or call 'add_method' on the class. This results in simpler syntax for the cases where you only want to override the vtable entry.

# method name is the same as vtable name
.sub get_string :method :vtable

# accessible as either $obj.stringify() or vtable
.sub stringify :method :vtable('get_string')

# accessible only as vtable
.sub get_string :vtable

# accessible only as vtable, and sub name ignored
.sub stringify :vtable('get_string')

Allison

Reply via email to