Commit Graph
17 Commits
Author SHA1 Message Date
Andreas K. Hüttel d3693d8856 perl-functions.eclass: Add EAPI=7 support
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
2019-08-12 22:09:10 +02:00
Michał Górny c65c388c3c perl-functions.eclass: add @SUPPORTED_EAPIS 2018-08-15 09:33:00 +02:00
Kent Fredric 196a5904b3 perl-functions.eclass: Fix documentation re: USAGE
And use @CODE examples where relevant instead as per
eclass-to-manpage.awk
2017-04-22 19:44:50 +12:00
Kent Fredric 88906a90f8 perl-functions.eclass: add perl_domodule 2017-04-22 09:31:00 +12:00
Kent Fredric 41659bb9fd perl-functions.eclass: add perl_get_vendorlib 2017-04-22 09:30:59 +12:00
Kent Fredric 5663be66d3 perl-functions.eclass: add perl_get_raw_vendorlib 2017-04-22 09:30:57 +12:00
Kent Fredric a06a8049af 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
2017-04-22 09:30:56 +12:00
Kent Fredric 6841f6f95f 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.
2017-04-22 09:30:56 +12:00
Kent Fredric c489d9313d 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.
2017-04-22 09:30:52 +12:00
Justin Lecher 7131191b36 Drop trailing whitespaces
Signed-off-by: Justin Lecher <jlec@gentoo.org>
2017-03-19 10:25:23 +00:00
Michał Górny 308630e439 perl-functions.eclass: Replace unnecessary eval with ${!var} 2017-03-08 08:35:32 +01:00
Robin H. Johnson 61b861acd7 Drop $Id$ per council decision in bug #611234.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2017-02-28 11:50:50 -08:00
Andreas K. Hüttel 535b816449 perl-functions.eclass: Add new function perl_doexamples 2016-04-11 23:48:42 +02:00
Andreas K. Hüttel abee956779 eclass: Improve packlist fixing, based on work by kent\n; bug 579492 and more 2016-04-10 20:12:17 +02:00
Andreas K. Hüttel dc858f6a75 perl-module.eclass and perl-functions.eclass: Add infrastructure to build .packlist files and keep/fix them in EAPI=6 2015-12-19 18:50:00 +01:00
Andreas K. Huettel (dilfridge) 945c4fb805 perl-functions.eclass: should 'just work' in EAPI=6 2015-12-03 21:20:16 +01:00
Andreas K. Huettel (dilfridge) ba47027097 perl-modules.eclass: Separate phases and helpers into two eclasses 2015-11-28 21:38:54 +01:00