weierophinney has asked for the wisdom of the Perl Monks concerning the following question:
One routine I have written calls the various 'build_' methods based on XML elements. I would like to test and make sure that the method is available before calling it.
I've tried Module::Info, but this actually parses the given module file looking for methods; if the modules has been subclassed, it won't find the new methods. My other inclination is to simply wrap the method call in an eval statement.
So my question is: Is there an easy way of finding out what methods are available to an object? Or is perl way of doing it to test for exceptions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Determining what methods are available to a class
by The Mad Hatter (Priest) on Aug 09, 2003 at 14:30 UTC | |
by weierophinney (Pilgrim) on Aug 09, 2003 at 14:42 UTC | |
|
Re: Determining what methods are available to a class
by larsen (Parson) on Aug 09, 2003 at 14:50 UTC | |
by chromatic (Archbishop) on Aug 09, 2003 at 17:43 UTC | |
|
Re: Determining what methods are available to a class (-d/m)
by tye (Sage) on Aug 09, 2003 at 22:54 UTC | |
|
Re: Determining what methods are available to a class
by adamk (Chaplain) on Aug 10, 2003 at 02:24 UTC |