Re: easier duck typing in .can

2006-06-18 Thread Sam Vilain
Yuval Kogman wrote: Since CANDO is a multimethod, IMHO this can be safely extended to allow: $object.can(Class); $object.can(Role); to better support duck typing. Why would you not use .does or .isa there? Are you wanting this to go through all of the Class/Role's

Re: easier duck typing in .can

2006-06-18 Thread Yuval Kogman
On Sun, Jun 18, 2006 at 18:08:00 +1200, Sam Vilain wrote: Why would you not use .does or .isa there? Are you wanting this to go through all of the Class/Role's methods and check that the $object.can() them? Because if you don't control $object's class you can't change it. -- Yuval Kogman

easier duck typing in .can

2006-06-17 Thread Yuval Kogman
Synopsis 12 specifies that: .can interrogates any class package's CANDO multimethod for names that are to be considered autoloadable methods in the class but aside from that is just a name - method iterator mapping. Since CANDO is a multimethod, IMHO this can be safely