Hi, I'm no expert on OO, but I'm a good code librarian. Does this snippet help?
#!/usr/bin/perl #given an arbitrary object, get a dump of all #the functions connected to the object. use CGI; my $obj = CGI->new(); print &dump_functions( $obj ); sub dump_functions { use Data::Dumper; use Class::Inspector; my ( $obj ) = @_; my ( $ref, $methods); $ref = ref $obj; $methods = Class::Inspector->methods( $ref, 'full', 'public' ); @{ $methods } = grep /$ref/, @{ $methods }; return Dumper( $methods ); } __END__

OUTPUT:

$VAR1 = [ 'CGI::AUTOLOAD', 'CGI::DESTROY', 'CGI::XHTML_DTD', 'CGI::add_parameter', 'CGI::all_parameters', 'CGI::binmode', 'CGI::cgi_error', 'CGI::charset', 'CGI::compile', 'CGI::croak', 'CGI::delete', 'CGI::escape', 'CGI::expand_tags', 'CGI::expires', 'CGI::import', 'CGI::init', 'CGI::initialize_globals', 'CGI::make_attributes', 'CGI::new', 'CGI::param', 'CGI::parse_params', 'CGI::print', 'CGI::put', 'CGI::read_from_cmdline', 'CGI::rearrange', 'CGI::save_request', 'CGI::self_or_CGI', 'CGI::self_or_default', 'CGI::to_filehandle', 'CGI::unescape' ];

In reply to Re: OO: All Methods by zentara
in thread OO: All Methods by rkg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.