Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: get the list of methods and variables

by almut (Canon)
on Jun 17, 2010 at 09:36 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found