Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 chilling in the Monastery: (8)
As of 2014-08-31 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls