Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How do I generate a list of available top-level packages?

by tobyink (Canon)
on May 06, 2020 at 18:18 UTC ( [id://11116515]=note: print w/replies, xml ) Need Help??


in reply to How do I generate a list of available top-level packages?

Try this:

dispSymbols(\%::);

Or this:

dispSymbols(\%main::);

They should both do the same thing. Be aware that the main package does have a bunch of random stuff in it.

Replies are listed 'Best First'.
Re^2: How do I generate a list of available top-level packages?
by nysus (Parson) on May 06, 2020 at 20:46 UTC

    Thanks. yeah, I see now I have to manually go through and pull the packages from that hairy hash manually.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      I have to manually go through and pull the packages from that hairy hash manually.

      You can also use Devel::Symdump:

      use Devel::Symdump; my @packages = Devel::Symdump->rnew->packages;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-29 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found