@@ -64,60 +64,44 @@ They are documented here for the benefit of future maintainers of this module.
6464
6565=item * Purpose
6666
67- Provide a list of filepaths where F<typemap> files may be found. The
68- filepaths -- relative paths to files (not just directory paths) -- appear in this list in lowest-to-highest priority.
69-
70- The highest priority is to look in the current directory.
71-
72- 'typemap'
73-
74- The second and third highest priorities are to look in the parent of the
75- current directory and a directory called F<lib/ExtUtils> underneath the parent
76- directory.
77-
78- '../typemap',
79- '../lib/ExtUtils/typemap',
80-
81- The fourth through ninth highest priorities are to look in the corresponding
82- grandparent, great-grandparent and great-great-grandparent directories.
83-
84- '../../typemap',
85- '../../lib/ExtUtils/typemap',
86- '../../../typemap',
87- '../../../lib/ExtUtils/typemap',
88- '../../../../typemap',
89- '../../../../lib/ExtUtils/typemap',
90-
91- The tenth and subsequent priorities are to look in directories named
92- F<ExtUtils> which are subdirectories of directories found in C<@INC > --
93- I<provided > a file named F<typemap> actually exists in such a directory.
94- Example:
95-
96- '/usr/local/lib/perl5/5.10.1/ExtUtils/typemap',
97-
98- However, these filepaths appear in the list returned by
99- C<standard_typemap_locations() > in reverse order, I<i.e. > , lowest-to-highest.
100-
101- '/usr/local/lib/perl5/5.10.1/ExtUtils/typemap',
102- '../../../../lib/ExtUtils/typemap',
103- '../../../../typemap',
104- '../../../lib/ExtUtils/typemap',
105- '../../../typemap',
106- '../../lib/ExtUtils/typemap',
107- '../../typemap',
108- '../lib/ExtUtils/typemap',
109- '../typemap',
110- 'typemap'
67+ Returns a standard list of filepaths where F<typemap> files may be found.
68+ This will typically be something like:
69+
70+ map("$_/ExtUtils/typemap", reverse @INC),
71+ qw(
72+ ../../../../lib/ExtUtils/typemap
73+ ../../../../typemap
74+ ../../../lib/ExtUtils/typemap
75+ ../../../typemap
76+ ../../lib/ExtUtils/typemap
77+ ../../typemap
78+ ../lib/ExtUtils/typemap
79+ ../typemap
80+ typemap
81+ )
82+
83+ but the style of the pathnames may vary with OS. Note that the value to
84+ use for C<@INC > is passed as an array reference, and can be something
85+ other than C<@INC > itself.
86+
87+ Pathnames are returned in the order they are expected to be processed;
88+ this means that later files will update or override entries found in
89+ earlier files. So in particular, F<typemap> in the current directory has
90+ highest priority. C<@INC > is searched in reverse order so that earlier
91+ entries in C<@INC > are processed later and so have higher priority.
92+
93+ The values of C<-typemap > switches are not used here; they should be added
94+ by the caller to the list of pathnames returned by this function.
11195
11296=item * Arguments
11397
114- my @stl = standard_typemap_locations( \@INC );
98+ my @stl = standard_typemap_locations(\@INC);
11599
116- Reference to C<@INC > .
100+ A single argument: a reference to an array to use as if it were C<@INC > .
117101
118102=item * Return Value
119103
120- Array holding list of directories to be searched for F<typemap> files .
104+ A list of F<typemap> pathnames .
121105
122106=back
123107
0 commit comments