Klaas-Jan Stol wrote:
Hi,
reading pdd15, I don't get this:
To override a vtable function, either add the :vtable to the declaration of
the method, or pass a named, slurpy parameter "vtable" into the
add_methodmethod on a class or role.
How would you write code for the 2nd way? If passing a parameter, shouldn't
it say "flat" instead of "slurpy"? (as it is used when passing, not
receiving the parameter) Or do I just misread?
class.add_method('methodname', methodobject, 'vtable'=>'vtablename')
"Slurpy" explains how it acts on the side of the subroutine, not the
call. But really, all this needs to say is "named parameter". Updated.
Allison