1Module::Install::AuthorURseeqruiCroenst(r3i)buted Perl DMoocduumleen:t:aItnisotnall::AuthorRequires(3)
2
3
4

NAME

6       Module::Install::AuthorRequires - declare author-only dependencies
7

SYNOPSIS

9           author_requires 'Some::Module';
10           author_requires 'Another::Module' => '0.42';
11

DESCRIPTION

13       Modules often have optional requirements, for example dependencies that
14       are useful for (optional) tests, but not required for the module to
15       work properly.
16
17       Usually you want all developers of a project to have these optional
18       modules installed. However, simply telling everyone or printing
19       diagnostic messages if optional dependencies are missing often isn't
20       enough to make sure all authors have all optional modules installed.
21
22       "Module::Install" already has a way of detecting an author environment,
23       so an easy way to achieve the above would be something like:
24
25           if ($Module::Install::AUTHOR) {
26               requires 'Some::Module';
27               requires 'Another::Module' => '0.42';
28           }
29
30       Unfortunately, that'll also make the optional dependencies show up in
31       the distributions "META.yml" file, which is obviously wrong, as they
32       aren't actually hard requirements.
33
34       Working that around requires a considerable amount of non-trivial
35       Makefile.PL hackery, or simply using this module's "author_requires"
36       command.
37

COMMANDS

39   author_requires
40           author_requires $module;
41           author_requires $module => $version;
42
43       This declares a hard dependency, that's only enforced in author
44       environments and is not put in the generate "META.yml" file of the
45       distribution.
46

AUTHOR

48       Florian Ragwitz <rafl@debian.org>
49
51       Copyright (c) 2009  Florian Ragwitz
52
53       This is free software; you can redistribute it and/or modify it under
54       the same terms as the Perl 5 programming language system itself.
55
56
57
58perl v5.32.0                      2020-07-28Module::Install::AuthorRequires(3)
Impressum