Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 taking refuge in the Monastery: (7)
As of 2014-11-25 00:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (148 votes), past polls