in reply to What packages are compiled?
Looks like there are several answers depending on what you want to do. There is a distinction between package namespaces, modules and distributions.
If you are wanting to take a snapshot of all namespaces that have been used, at a particular point during execution, you can, as PodMaster has suggested, use Devel::Symdump. Or you can walk through the symbol table yourself:
all_below('Foo::'); sub all_below { my $ns = shift; no strict 'refs'; ( $ns, map { (/::$/ && !/main::/) ? all_below($ns.$_) : () } keys %$ns ); }
But if you are looking at determining dependencies without running any code, this won't include everything, but Module::ScanDeps has a good attempt at finding everything used or required.
As you pointed out, any .pm module can potentially put stuff into any namespace, and it's a matter of convention and etiquette that we don't lose control of namespaces.
In terms of distributions, the META.yml and the .packlist file (written by make install) list out which .pm modules are installed by a distribution.
Hope this helps.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What packages are compiled?
by maard (Pilgrim) on Dec 10, 2005 at 13:06 UTC |