FloydATC has asked for the wisdom of the Perl Monks concerning the following question:
I know I can check for a given sub like this
$sub = $obj->can("print");
but what I'd like is something like
@subnames = $obj->can(); # Just to illustrate, does not work
or even
@subnames = Some::Class::can(); # Just to illustrate, does not work
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Package introspection
by jau (Hermit) on Jul 17, 2010 at 11:17 UTC | |
by FloydATC (Deacon) on Jul 17, 2010 at 11:29 UTC | |
|
Re: Package introspection
by JavaFan (Canon) on Jul 17, 2010 at 09:51 UTC | |
|
Re: Package introspection
by chromatic (Archbishop) on Jul 17, 2010 at 22:14 UTC | |
|
Re: Package introspection
by morgon (Priest) on Jul 18, 2010 at 07:10 UTC | |
by FloydATC (Deacon) on Jul 19, 2010 at 05:00 UTC | |
|
Re: Package introspection
by exussum0 (Vicar) on Jul 18, 2010 at 11:34 UTC |