laziness, impatience, and hubris | |
PerlMonks |
Can I find out which package a subroutine is from, originally?by nate (Monk) |
on Jan 03, 2001 at 05:58 UTC ( [id://49434]=perlquestion: print w/replies, xml ) | Need Help?? |
nate has asked for the wisdom of the Perl Monks concerning the following question:
Most honorable monks, here is a question to prove
your mastery of the
symbol table and Perl's intestines:
I have a collection of modules in Everything::Node:: which carry functions for specific nodetypes -- (ie Everything::Node::user contains methods for user objects, Everything::Node::document for documents, etc). All of these modules "use Everything;" which allows them to access necessary functions. Well, this works fine and dandy -- until I actually want to "see" into a specific module and figure out which subroutines are coming from Everything::Node::user. I can check the symbol table with something like this:
It gives me all the functions in the module, but it also gives me all the symbols that are exported from Everything.pm (or any other included modules). All I want is the symbols that are defined by the specific module -- exclusive of exports from other modules. Is there any way I can find which package each sub originated from, so I can discriminate and only show the methods from Everything::Node::user? Much appreciation for needed wisdoms, --nate PS for those of you familiar with Everything core, I'm trying to fix this bug from the "Gigantic Code Lister" in the "showchoicefunc" htmlcode...
Back to
Seekers of Perl Wisdom
|
|