Given a CPAN dist file (e.g. like Acme-Chef-1.01.tar.gz
), what is the algorithm to determine what module-versions are "defined" (or present) in the dist file?
For instance, in the 02packages.details.txt
file, there are four lines which correspond to this dist file:
Acme::Chef 1.01 S/SM/SMUELLER/Acme-Chef-1.01.tar.gz
Acme::Chef::Container 1.00 S/SM/SMUELLER/Acme-Chef-1.01.tar.gz
Acme::Chef::Ingredient 1.00 S/SM/SMUELLER/Acme-Chef-1.01.tar.gz
Acme::Chef::Recipe 1.00 S/SM/SMUELLER/Acme-Chef-1.01.tar.gz
I basically want to know how those lines are generated.
Is the procedure something like:
- find all of the
.pm
files in the dist file - load each of the
.pm
files and print out${ "${pkg}::VERSION"}
where$pkg
is the package name corresponding to the.pm
file name (i.e. if the.pm
file name isFoo/Bar.pm
then$pkg
isFoo::Bar
.)
Is there code which does this indexing procedure?
Do you really have to load the module in order to determine what its version is?