Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Here's something I quickly hacked together. It might need some work:
#!/usr/bin/perl use strict; use warnings; my $class = shift; eval "use $class"; die $@ if $@; # First, find all the classes, and the ones it inherits. my %classes = ($class => 1); my @classes = ($class); while (@classes) { my $class = pop @classes; no strict 'refs'; foreach my $class (@{"$class\::ISA"}) { next if $classes {$class} ++; push @classes => $class; } } # Then find the subs in those classes. while (my $class = each %classes) { no strict 'refs'; print "From class '$class':\n"; while (my $entry = each %{"$class\::"}) { print "\t$entry\n" if defined &{"$class\::$entry"}; } } __END__
Calling this with IO::File as argument gives:
From class 'IO::Seekable': sysseek setpos croak confess getpos carp tell seek From class 'IO::File': qualify new confess ungensym open qualify_to_ref gensym croak new_tmpfile carp From class 'IO::Handle': qualify setvbuf format_write fcntl format_lines_per_page print sysread format_top_name input_record_separator SEEK_SET stat confess opened flush eof _open_mode_string syswrite error _IONBF format_formfeed format_page_number sync truncate constant croak SEEK_CUR gets carp fdopen getc untaint read new fileno clearerr write format_line_break_characters blocking format_name ungetc autoflush setbuf ioctl DESTROY ungensym _IOFBF qualify_to_ref _IOLBF output_record_separator gensym close getline output_field_separator printf formline format_lines_left SEEK_END printflush getlines input_line_number new_from_fd From class 'Exporter': export_fail export_tags export_ok_tags export import as_heavy require_version export_to_level

In reply to Re: OO: All Methods by Abigail-II
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found