How can I tell what modules were originally provided with the specific Perl installation on a machine?
(This is not a duplicate of: http://stackoverflow.com/questions/2049735 ( "How can I tell if a Perl module is core or part of the standard install?" ) - it is in fact a spin-off question from it )
I am looking for what came with the installation originally, what modules were provided as part of that installation, what was built-in. NOT what has been installed since then.
I would like this to work with any Perl version.
I want to be able to do this:
- using a script within a Perl program itself/command on the machine that has the installation. So for this I would be relying upon the installation to have a record in some form as to what it has originally.
- on the downloaded package before I do the install. Ask it what modules it has.
The reasons why I want to do this is:
- I want to know what modules I can expect as default when writing software to run on a machine with the Perl installation, and what modules I would need to add which aren't default
- if I keep the original installer image/package OR know how to get the exact thing again online, then I have a repeatable consistent Perl installation for several machines with the knowledge of what modules will be present and what modules will not.
- my Perl software will have a well defined deployment procedure as it is easy to define exactly what is required by the software
- I may not be able to just update/upgrade the Perl version easily due to policies in place in my organisation (that's just the way it is, I don't want a side discussion on this). Such policy can be justified as there is always a risk upgrading to new software that can outweigh the benefits. Developers therefore need to know what they can expect to be available.
The reason why I ask this question is because, for any Perl version, there appears not to be an automated way of finding out the overall standard installation defining what modules you can expect to be present in your default installation on your machine - see question: http://stackoverflow.com/questions/2049735 ( "How can I tell if a Perl module is core or part of the standard install?" )
The Perl versions cannot be relied upon to tell you what modules are present or not. Sure, there might be documentation online that tells you. But I need an automated way of doing this on the release I download/install. Even the same Perl version on different Linux/Unix distributions can be different.