[Chicago-talk] Asking an class for its method list

Jay Strauss me at heyjay.com
Mon Jan 26 08:22:54 CST 2004

Well, I was going to use it because I have one module (client) which the
caller requests methods like:


this module then calls a liked named function on my poe server.  I figured
instead of writing a specific function in this module for each function on
the poe server.   I would just dynamically check it that function exists,
and handle all the calls with AUTOLOADER.  Unfortunately, the module::info
takes too long so instead I just have a list of functions available and
still use AUTOLOADER to call them

----- Original Message -----
From: "Steven Lembark" <lembark at wrkhors.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Monday, January 26, 2004 12:05 AM
Subject: Re: [Chicago-talk] Asking an class for its method list

> > AUTOLOAD is trouble yeah :) Module::Info has a useful superclasses()
> > method to get at parent classes, which (with a bit of recursion) can
> > return the  subs:
> Which means it may not handle auto-splits either.
> Again, why would someone need this -- aside from
> auto-documenting code? Calling "can" will tell you
> if something has the method and deals with AUTOLOAD
> gracefully.
> --
> Steven Lembark                               2930 W. Palmer
> Workhorse Computing                       Chicago, IL 60647
>                                             +1 888 359 3508
> _______________________________________________
> 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