J
J Krugman
I am aware of the UNIVERSAL::can method to determine whether an
object can perform a particular method, but is there a way to get
all the methods that an object can perform (including the inherited
ones, of course)? I realize this question is complicated by
AUTOLOAD, but I'd be happy if I could find all of an object's
non-AUTOLOADed methods.
More generally, how does UNIVERSAL determine whether object $foo
can 'fandango'? Does it simply run eval { $foo->fandango() } and
then pick through the bloody aftermath in $@, or does it use a more
civilized approach, such as looking up some suitable tables? If
the latter is true, how can a program access these tables of methods
directly?
Thanks!
-Jill
object can perform a particular method, but is there a way to get
all the methods that an object can perform (including the inherited
ones, of course)? I realize this question is complicated by
AUTOLOAD, but I'd be happy if I could find all of an object's
non-AUTOLOADed methods.
More generally, how does UNIVERSAL determine whether object $foo
can 'fandango'? Does it simply run eval { $foo->fandango() } and
then pick through the bloody aftermath in $@, or does it use a more
civilized approach, such as looking up some suitable tables? If
the latter is true, how can a program access these tables of methods
directly?
Thanks!
-Jill