File tree Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ t/prereq.t
137137t/prereq_print.t
138138t/problems.t
139139t/prompt.t
140+ t/rec_att_keys.t
140141t/recurs.t
141142t/revision.t
142143t/several_authors.t
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ our @Get_from_Config; # referenced by MM_Unix
2121our @MM_Sections ;
2222our @Overridable ;
2323my @Prepend_parent ;
24- my %Recognized_Att_Keys ;
24+ our %Recognized_Att_Keys ;
2525our %macro_fsentity ; # whether a macro is a filesystem name
2626our %macro_dep ; # whether a macro is a dependency
2727
@@ -1768,6 +1768,11 @@ The following attributes may be specified as arguments to WriteMakefile()
17681768or as NAME=VALUE pairs on the command line. Attributes that became
17691769available with later versions of MakeMaker are indicated.
17701770
1771+ A computer-readable list of recognized attributes is available as
1772+ C<%ExtUtils::MakeMakers::Recognized_Att_Keys > , supported since 7.72. You
1773+ can check whether a particular parameter is supported by the current
1774+ version of ExtUtils::MakeMaker by checking whether it exists in the hash.
1775+
17711776In order to maintain portability of attributes with older versions of
17721777MakeMaker you may want to use L<App::EUMM::Upgrade> with your C<Makefile.PL > .
17731778
Original file line number Diff line number Diff line change 1+ # !/usr/bin/perl -w
2+
3+ # This script tests %ExtUtils::MakeMaker::Recognized_Att_Keys;
4+
5+ use strict;
6+ use Test::More;
7+
8+ # We don’t need to test all parameters; just enough to verify that the
9+ # mechanism is working. This list is somewhat random, but it works.
10+
11+ my @supported = qw(
12+ ABSTRACT_FROM
13+ AUTHOR
14+ BUILD_REQUIRES
15+ clean
16+ dist
17+ DISTNAME
18+ DISTVNAME
19+ LIBS
20+ MAN3PODS
21+ META_MERGE
22+ MIN_PERL_VERSION
23+ NAME
24+ PL_FILES
25+ PREREQ_PM
26+ VERSION
27+ VERSION_FROM
28+ ) ;
29+
30+ my @unsupported = qw(
31+ WIBBLE
32+ wump
33+ ) ;
34+
35+ plan tests => @supported +@unsupported ;
36+
37+ use ExtUtils::MakeMaker ();
38+
39+ for (@supported ) {
40+ ok exists $ExtUtils::MakeMaker::Recognized_Att_Keys {$_ },
41+ " EUMM says it supports param '$_ '" ;
42+ }
43+ for (@unsupported ) {
44+ ok !exists $ExtUtils::MakeMaker::Recognized_Att_Keys {$_ },
45+ " EUMM claims not to support param '$_ '" ;
46+ }
You can’t perform that action at this time.
0 commit comments