Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Determining what methods are available to a class

by larsen (Parson)
on Aug 09, 2003 at 14:50 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://282420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found