Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Determining what methods are available to a class

by larsen (Parson)
on Aug 09, 2003 at 14:50 UTC ( #282420=note: print w/ replies, xml ) Need Help??


in reply to Determining what methods are available to a class

Another way is to look into the package symbol table. For example:

use strict; use warnings; use Devel::Symdump; use CGI; # for our example we will look into the CGI package my $obj = Devel::Symdump->rnew( 'CGI' ); my @f = $obj->functions; print join "\n", @f;
And here part of the output:
CGI::Util::rearrange
CGI::Util::make_attributes
CGI::Util::utf8_chr
CGI::Util::simple_escape
CGI::Util::unescape
...
CGI::croak
CGI::import
CGI::binmode
CGI::self_or_CGI
CGI::expires


Comment on Re: Determining what methods are available to a class
Download Code
Re: Re: Determining what methods are available to a class
by chromatic (Archbishop) on Aug 09, 2003 at 17:43 UTC

    Unfortunately, that doesn't account for inherited methods or AUTOLOADed methods. (Remember to write your own can() when you AUTOLOAD() accessors and such.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://282420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-07-07 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls