Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: What is Exported from modules

by broquaint (Abbot)
on Jul 12, 2005 at 17:26 UTC ( #474344=note: print w/ replies, xml ) Need Help??


in reply to What is Exported from modules

To reliably find what was exported from another package you need to do a little symbol table interrogation e.g

sub find_exported_symbols { my($in, $from) = @_; no strict 'refs'; my($in_tbl, $from_tbl) = ( \%{"$in\::"}, \%{"$from\::"} ); return grep { my $sym = $_; grep { \*$sym == \*$_ } keys %$from_tbl; } keys %$in_tbl; } use Symbol qw/ gensym qualify delete_package /; print "found $_ in main from Symbol\n" for find_exported_symbols( 'main', 'Symbol' );
HTH

_________
broquaint


Comment on Re: What is Exported from modules
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-09-22 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls