[Chicago-talk] Asking an class for its method list
Jay Strauss
me at heyjay.com
Sun Jan 25 17:13:16 CST 2004
Thanks Ed,
I knew there must be a way
Jay
----- Original Message -----
From: "Ed Summers" <ehs at pobox.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Sunday, January 25, 2004 4:59 PM
Subject: Re: [Chicago-talk] Asking an class for its method list
> On Sun, Jan 25, 2004 at 04:50:39PM -0600, Jay Strauss wrote:
> > How can I get back a list of methods available in an class?
>
> Without getting down and dirty with namespaces, you can install
> the lovely Module::Info:
>
> use Module::Info;
> my $module = Module::Info->new_from_module( 'CGI' );
>
> my %subroutines = $module->subroutines();
>
> foreach $subroutine ( keys( %subroutines ) ) {
> print "$subroutine\n";
> }
>
> //Ed
>
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
>
>
More information about the Chicago-talk
mailing list