perl-functions.eclass: add perl_has_module_version
authorKent Fredric <kentnl@gentoo.org>
Mon, 23 Jan 2017 23:48:09 +0000 (12:48 +1300)
committerKent Fredric <kentnl@gentoo.org>
Fri, 21 Apr 2017 21:30:56 +0000 (09:30 +1200)
commit6841f6f95fdef73a52468e105a48ad15c5c4548e
tree3494a12e6130a3f37c08f3743cd13b4a7e866384
parentc489d9313da67805cccbd50934861a31c792e42b
perl-functions.eclass: add perl_has_module_version

This is a utility for runtime checking if a module of a given version
is installed from the perspective of Perl, whos opinion could be
different than portage in the event of perl-core/* dual life effects
shortly after a major Perl upgrade.

Use this only if perl_has_module is insufficient, as the overheads
and risk of side effects from this approach are high, given the module
has to be actually loaded for the version comparison to happen.

exits "true" if Perl has the given module installed at the given
version ( or later ), exits "false" otherwise.
eclass/perl-functions.eclass