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
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
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