perl-functions.eclass: Add perl_has_module
authorKent Fredric <kentnl@gentoo.org>
Wed, 3 Aug 2016 03:17:54 +0000 (15:17 +1200)
committerKent Fredric <kentnl@gentoo.org>
Fri, 21 Apr 2017 21:30:52 +0000 (09:30 +1200)
commitc489d9313da67805cccbd50934861a31c792e42b
tree87cf518f5be22a52ebe5aec687a8ca1dd9554599
parent6fabd8aaf89ad013266bad0699ec9f5a1ba08ffa
perl-functions.eclass: Add perl_has_module

This is an incredibly fast way to check if Perl considers a module
of the given name installed in any capacity, including broken.

As long as "Foo.pm" is somewhere in @INC, `perl_has_module Foo` will
return true.

Even `perl_has_module threads` will return true on non-threaded perls,
due to that module still being present, and the module only fataling
when loaded.

Whereas `perl_has_module_version threads 0` will always fail on
non-threaded perls.
eclass/perl-functions.eclass