I'm all for something like this, though I prefer "requires_libraries" instead. (Listing libraries distinct from applications is a grey area, so best to put them under one term.)
Come to think of it, why not "recommends_libraries" too?
What is needed is some standard set of library and application names.
Implementing platform-independent logic to find these libraries is another matter.
Here's an idea. A module namespace called Config::Libraries, such as
Config::Libraries->info('libgd')
which returns a hash of relevant information about the library. Some of the hash keys would be standardized, such as one to return a path to where the library or application is installed, another to return the version. (It would return undef if the library was not installed.)
This information would be read from an adequate text configuration file format (YAML or IniFile).
There should be another interface to update the config file easily, along with a command-line script to do this.
Library installation utilities can use this script, or users can use it to manually update the config as needed.
The module would have some messy installation procedure that sets up an initial script. Ideally it should have Platform-specific parts inside generic wrapper methods. There might be a separate installation file for each application that uses these methods to configure itself: this way adding a new library to the utility is a matter of adding script.
Pseudo-library names could be given to special capabilities that some systems do not have.
The downside is controlling the library namespace. Whoever controls the Config::Libraries module would have the de facto control, which is probably good enough for the time being.
That said, who has time to work on such a project? I've got my hands full already.
Eventually there will likely be a series of modules in Probe::* to deal with this sort of stuff. If no one else is interested I guess I'll eventually get around to it. The functionality is needed for Module::Build, specifically for either the proposed fields to the META spec or dEx[1] which is intended as an alternative solution to many of the proposed fields in the META spec.
There will be things like:
Probe::OS - Gather info on the operating system
Probe::Libs
Probe::Progs
Probe::FileSys - maybe incorporate ideas Schwern posted on p5p recently, detecting sensitivity, preservability of case, etc
Probe::Locations - where to install parts of apps, config files, data files
Probe::Apache
etc.
(IIUC, this namespace was once proposed for this use, but noone has developed it.)
At least this is what I'm thinking at the moment. It's subject to change. And this is a long way into the future. Lots of stuff to be done first.
1. <https://svn.versiondude.net/wsvn/randys/wsvn/dEx/trunk/lib/dEx.pm?op=file>