Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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') };

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2016-10-28 19:07 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (386 votes). Check out past polls.