Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: get the list of methods and variables

by almut (Canon)
on Jun 17, 2010 at 09:36 UTC ( #845174=note: print w/ replies, xml ) Need Help??


in reply to get the list of methods and variables

Class::Inspector might also help.  For example:

#!/usr/bin/perl -l package PkgA; sub fooA {} sub barA {} package PkgB; use base "PkgA"; sub fooB {} package PkgC; use base "PkgB"; sub barC {} package main; use Class::Inspector; print for @{ Class::Inspector->methods('PkgC', 'full') }; __END__ PkgA::barA PkgC::barC PkgA::fooA PkgB::fooB

Or, if you want to call it from within the child package (PkgC):

... package PkgC; ... use Class::Inspector; print for @{ Class::Inspector->methods(__PACKAGE__, 'full') };


Comment on Re: get the list of methods and variables
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-07-07 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls