develooper Front page | perl.beginners | Postings from April 2012

Re: How Can I find all kinds of methods a Object support?

Thread Previous | Thread Next
From:
Peter Scott
Date:
April 12, 2012 21:01
Subject:
Re: How Can I find all kinds of methods a Object support?
Message ID:
20120413040103.15482.qmail@lists-nntp.develooper.com
On Wed, 11 Apr 2012 16:12:22 +0800, Zapp 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.

I suspect that what you want is documentation, because a literal answer 
to your question will only give a list of method names, which is rarely 
useful (I've used it on occasion for very specialized classes where that 
list constituted metadata of a sort.)

As Lesley said, if you don't find the methods you're looking for in the 
class itself, try superclasses.  This is one case where the structured 
nature of documentation in more rigid languages has an edge over Perl.

-- 
Peter Scott
http://www.perlmedic.com/     http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
http://www.oreillyschool.com/certificates/perl-programming.php

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About