Hi Zapp, On Wed, 11 Apr 2012 16:12:22 +0800 Zapp <zapp.pref...@gmail.com> wrote:
> How Can I find all kinds of methods a Object support? > For example: > > my $fh = IO::File->new("/path/to/file"); > > how manny kinds of methods does the $fh have ? > > I try perldoc IO::File , but didn't find what I want. > See: http://stackoverflow.com/questions/910430/how-do-i-list-available-methods-on-a-given-object-or-package-in-perl The best answer there, in my humble opinion, is to use the Class::Inspector CPAN module: my @methods = Class::Inspector->methods( 'Foo::Class', 'full', 'public' ); Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ List of Portability Libraries - http://shlom.in/port-libs Modern Perl — the 3‐D Movie. In theatres near you. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/