perl-functions.eclass: add perl_get_module_version
authorKent Fredric <kentnl@gentoo.org>
Mon, 23 Jan 2017 23:48:20 +0000 (12:48 +1300)
committerKent Fredric <kentnl@gentoo.org>
Fri, 21 Apr 2017 21:30:56 +0000 (09:30 +1200)
commita06a8049af61c1db130173dde89f5a88e5d3f749
tree1c33e2b4fbb4cb2b9dbf8d23debb8c8cd1363a5e
parent6841f6f95fdef73a52468e105a48ad15c5c4548e
perl-functions.eclass: add perl_get_module_version

This utility provides informational data describing the given module
names state of installation, either as a version, or as an error
message describing the grade of failure incurred in module loading.

It has the side effect that it most load the module (and its
dependencies) into memory to give a report value, and can be expensive
and have side-effects from Perl code execuring while the module loads,
including (but not limited to) people calling POSIX::_exit

This is the slowest way of inspecting state about a module, as
it must load the module
eclass/perl-functions.eclass