Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks, Is there a way to show all available objects of a modules? Now I'm searching through the .pm file, there should be a quicker way I guess? Thanx! Happy New Year to everybody!

Replies are listed 'Best First'.
Re: Show available module objects.
by Thilosophy (Curate) on Dec 28, 2004 at 09:18 UTC
    Devel::Symdump lets you examine all the symbols in a package.
    use Devel::Symdump; use CGI; my $obj = Devel::Symdump->new('CGI'); $obj->as_string
    produces
    arrays CGI::ISA CGI::QUERY_PARAM functions CGI::AUTOLOAD CGI::DESTROY CGI::XHTML_DTD CGI::_checked (...) CGI::to_filehandle CGI::unescape hashes CGI::EXPORT CGI::EXPORT_OK CGI::EXPORT_TAGS CGI::QUERY_FIELDNAMES CGI::QUERY_PARAM ios packages CGI::Util scalars CGI::AUTOLOAD CGI::AUTOLOADED_ROUTINES CGI::AUTOLOAD_DEBUG CGI::AutoloadClass CGI::BEEN_THERE CGI::BEGIN CGI::CGI (...) CGI::to_filehandle CGI::unescape unknowns
    Note that AUTOLOAD'ed subroutines will not be shown, and that without the documentation you still have no idea what these symbols are for, and which and how to use them.

    perldoc ModuleName should bring up the module documentation pretty fast.

Re: Show available module objects.
by Joost (Canon) on Dec 28, 2004 at 15:02 UTC