Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Class Browser for Perl

by Anonymous Monk
on Oct 24, 2008 at 21:54 UTC ( [id://719440]=note: print w/replies, xml ) Need Help??


in reply to Class Browser for Perl

For inspecting module subs and class methods, I use Class::Inspector in a script like so:
#!/usr/bin/perl
use strict;
use warnings;
use Class::Inspector;
use English qw( -no_match_vars );

for my $class_name ( @ARGV ) {
    chomp $class_name;
    print "$class_name:\n";
    eval {
        eval "require $class_name";
    };
    if ( $EVAL_ERROR ) {
        print "Unable to load class $class_name! ($EVAL_ERROR)\n";
        next;
    }

    my $method_names_ref = Class::Inspector->methods( $class_name, 'full' );
    if ( !defined $method_names_ref ) {
        print "No methods for class $class_name!\n";
        next;
    }

    my @method_names = @{ $method_names_ref };
    for my $method_name ( sort @method_names ) {
        print "\t$method_name\n";
    }
}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://719440]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2025-11-12 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.