Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Module::CoreList.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "Module::CoreList 3pm"
61 .TH Module::CoreList 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 Module::CoreList \- what modules shipped with versions of perl
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& use Module::CoreList;
72 \&
73 \& print $Module::CoreList::version{5.00503}{CPAN}; # prints 1.48
74 \&
75 \& print Module::CoreList\->first_release(\*(AqFile::Spec\*(Aq);
76 \& # prints 5.00405
77 \&
78 \& print Module::CoreList\->first_release_by_date(\*(AqFile::Spec\*(Aq);
79 \& # prints 5.005
80 \&
81 \& print Module::CoreList\->first_release(\*(AqFile::Spec\*(Aq, 0.82);
82 \& # prints 5.006001
83 \&
84 \& if (Module::CoreList::is_core(\*(AqFile::Spec\*(Aq)) {
85 \& print "File::Spec is a core module\en";
86 \& }
87 \&
88 \& print join \*(Aq, \*(Aq, Module::CoreList\->find_modules(qr/Data/);
89 \& # prints \*(AqData::Dumper\*(Aq
90 \& print join \*(Aq, \*(Aq,
91 \& Module::CoreList\->find_modules(qr/test::h.*::.*s/i, 5.008008);
92 \& # prints \*(AqTest::Harness::Assert, Test::Harness::Straps\*(Aq
93 \&
94 \& print join ", ", @{ $Module::CoreList::families{5.005} };
95 \& # prints "5.005, 5.00503, 5.00504"
96 .Ve
97 .SH DESCRIPTION
98 .IX Header "DESCRIPTION"
99 Module::CoreList provides information on which core and dual\-life modules shipped
100 with each version of perl.
101 .PP
102 It provides a number of mechanisms for querying this information.
103 .PP
104 There is a utility called corelist provided with this module
105 which is a convenient way of querying from the command\-line.
106 .PP
107 There is a functional programming API available for programmers to query
108 information.
109 .PP
110 Programmers may also query the contained hash structures to find relevant
111 information.
112 .SH "FUNCTIONS API"
113 .IX Header "FUNCTIONS API"
114 These are the functions that are available, they may either be called as functions or class methods:
115 .PP
116 .Vb 1
117 \& Module::CoreList::first_release(\*(AqFile::Spec\*(Aq); # as a function
118 \&
119 \& Module::CoreList\->first_release(\*(AqFile::Spec\*(Aq); # class method
120 .Ve
121 .ie n .IP "first_release( MODULE )" 4
122 .el .IP "\f(CWfirst_release( MODULE )\fR" 4
123 .IX Item "first_release( MODULE )"
124 Behaviour since version 2.11
125 .Sp
126 Requires a MODULE name as an argument, returns the perl version when that module first
127 appeared in core as ordered by perl version number or undef ( in scalar context )
128 or an empty list ( in list context ) if that module is not in core.
129 .ie n .IP "first_release_by_date( MODULE )" 4
130 .el .IP "\f(CWfirst_release_by_date( MODULE )\fR" 4
131 .IX Item "first_release_by_date( MODULE )"
132 Requires a MODULE name as an argument, returns the perl version when that module first
133 appeared in core as ordered by release date or undef ( in scalar context )
134 or an empty list ( in list context ) if that module is not in core.
135 .ie n .IP """find_modules( REGEX, [ LIST OF PERLS ] )""" 4
136 .el .IP "\f(CWfind_modules( REGEX, [ LIST OF PERLS ] )\fR" 4
137 .IX Item "find_modules( REGEX, [ LIST OF PERLS ] )"
138 Takes a regex as an argument, returns a list of modules that match the regex given.
139 If only a regex is provided applies to all modules in all perl versions. Optionally
140 you may provide a list of perl versions to limit the regex search.
141 .ie n .IP "find_version( PERL_VERSION )" 4
142 .el .IP "\f(CWfind_version( PERL_VERSION )\fR" 4
143 .IX Item "find_version( PERL_VERSION )"
144 Takes a perl version as an argument. Upon successful completion, returns a
145 reference to a hash. Each element of that hash has a key which is the name of
146 a module (\fIe.g.,\fR \*(AqFile::Path\*(Aq) shipped with that version of perl and a value
147 which is the version number (\fIe.g.,\fR \*(Aq2.09\*(Aq) of that module which shipped
148 with that version of perl . Returns \f(CW\*(C`undef\*(C'\fR otherwise.
149 .ie n .IP """is_core( MODULE, [ MODULE_VERSION, [ PERL_VERSION ] ] )""" 4
150 .el .IP "\f(CWis_core( MODULE, [ MODULE_VERSION, [ PERL_VERSION ] ] )\fR" 4
151 .IX Item "is_core( MODULE, [ MODULE_VERSION, [ PERL_VERSION ] ] )"
152 Available in version 2.99 and above.
153 .Sp
154 Returns true if MODULE was bundled with the specified version of Perl.
155 You can optionally specify a minimum version of the module,
156 and can also specify a version of Perl.
157 If a version of Perl isn\*(Aqt specified,
158 \&\f(CWis_core()\fR will use the numeric version of Perl that is running (ie \f(CW$]\fR).
159 .Sp
160 If you want to specify the version of Perl, but don\*(Aqt care about
161 the version of the module, pass \f(CW\*(C`undef\*(C'\fR for the module version:
162 .ie n .IP """is_deprecated( MODULE, PERL_VERSION )""" 4
163 .el .IP "\f(CWis_deprecated( MODULE, PERL_VERSION )\fR" 4
164 .IX Item "is_deprecated( MODULE, PERL_VERSION )"
165 Available in version 2.22 and above.
166 .Sp
167 Returns true if MODULE is marked as deprecated in PERL_VERSION. If PERL_VERSION is
168 omitted, it defaults to the current version of Perl.
169 .ie n .IP "deprecated_in( MODULE )" 4
170 .el .IP "\f(CWdeprecated_in( MODULE )\fR" 4
171 .IX Item "deprecated_in( MODULE )"
172 Available in version 2.77 and above.
173 .Sp
174 Returns the first perl version where the MODULE was marked as deprecated. Returns \f(CW\*(C`undef\*(C'\fR
175 if the MODULE has not been marked as deprecated.
176 .ie n .IP "removed_from( MODULE )" 4
177 .el .IP "\f(CWremoved_from( MODULE )\fR" 4
178 .IX Item "removed_from( MODULE )"
179 Available in version 2.32 and above
180 .Sp
181 Takes a module name as an argument, returns the first perl version where that module
182 was removed from core. Returns undef if the given module was never in core or remains
183 in core.
184 .ie n .IP "removed_from_by_date( MODULE )" 4
185 .el .IP "\f(CWremoved_from_by_date( MODULE )\fR" 4
186 .IX Item "removed_from_by_date( MODULE )"
187 Available in version 2.32 and above
188 .Sp
189 Takes a module name as an argument, returns the first perl version by release date where that module
190 was removed from core. Returns undef if the given module was never in core or remains
191 in core.
192 .ie n .IP """changes_between( PERL_VERSION, PERL_VERSION )""" 4
193 .el .IP "\f(CWchanges_between( PERL_VERSION, PERL_VERSION )\fR" 4
194 .IX Item "changes_between( PERL_VERSION, PERL_VERSION )"
195 Available in version 2.66 and above.
196 .Sp
197 Given two perl versions, this returns a list of pairs describing the changes in
198 core module content between them. The list is suitable for storing in a hash.
199 The keys are library names and the values are hashrefs. Each hashref has an
200 entry for one or both of \f(CW\*(C`left\*(C'\fR and \f(CW\*(C`right\*(C'\fR, giving the versions of the
201 library in each of the left and right perl distributions.
202 .Sp
203 For example, it might return these data (among others) for the difference
204 between 5.008000 and 5.008001:
205 .Sp
206 .Vb 4
207 \& \*(AqPod::ParseLink\*(Aq => { left => \*(Aq1.05\*(Aq, right => \*(Aq1.06\*(Aq },
208 \& \*(AqPod::ParseUtils\*(Aq => { left => \*(Aq0.22\*(Aq, right => \*(Aq0.3\*(Aq },
209 \& \*(AqPod::Perldoc\*(Aq => { right => \*(Aq3.10\*(Aq },
210 \& \*(AqPod::Perldoc::BaseTo\*(Aq => { right => undef },
211 .Ve
212 .Sp
213 This shows us two libraries being updated and two being added, one of which has
214 an undefined version in the right\-hand side version.
215 .SH "DATA STRUCTURES"
216 .IX Header "DATA STRUCTURES"
217 These are the hash data structures that are available:
218 .ie n .IP %Module::CoreList::version 4
219 .el .IP \f(CW%Module::CoreList::version\fR 4
220 .IX Item "%Module::CoreList::version"
221 A hash of hashes that is keyed on perl version as indicated
222 in $]. The second level hash is module => version pairs.
223 .Sp
224 Note, it is possible for the version of a module to be unspecified,
225 whereby the value is \f(CW\*(C`undef\*(C'\fR, so use \f(CW\*(C`exists $version{$foo}{$bar}\*(C'\fR if
226 that\*(Aqs what you\*(Aqre testing for.
227 .Sp
228 Starting with 2.10, the special module name \f(CW\*(C`Unicode\*(C'\fR refers to the version of
229 the Unicode Character Database bundled with Perl.
230 .ie n .IP %Module::CoreList::delta 4
231 .el .IP \f(CW%Module::CoreList::delta\fR 4
232 .IX Item "%Module::CoreList::delta"
233 Available in version 3.00 and above.
234 .Sp
235 It is a hash of hashes that is keyed on perl version. Each keyed hash will have the
236 following keys:
237 .Sp
238 .Vb 3
239 \& delta_from \- a previous perl version that the changes are based on
240 \& changed \- a hash of module/versions that have changed
241 \& removed \- a hash of modules that have been removed
242 .Ve
243 .ie n .IP %Module::CoreList::released 4
244 .el .IP \f(CW%Module::CoreList::released\fR 4
245 .IX Item "%Module::CoreList::released"
246 Keyed on perl version this contains ISO
247 formatted versions of the release dates, as gleaned from perlhist.
248 .ie n .IP %Module::CoreList::families 4
249 .el .IP \f(CW%Module::CoreList::families\fR 4
250 .IX Item "%Module::CoreList::families"
251 New, in 1.96, a hash that
252 clusters known perl releases by their major versions.
253 .ie n .IP %Module::CoreList::deprecated 4
254 .el .IP \f(CW%Module::CoreList::deprecated\fR 4
255 .IX Item "%Module::CoreList::deprecated"
256 A hash of hashes keyed on perl version and on module name.
257 If a module is defined it indicates that that module is
258 deprecated in that perl version and is scheduled for removal
259 from core at some future point.
260 .ie n .IP %Module::CoreList::upstream 4
261 .el .IP \f(CW%Module::CoreList::upstream\fR 4
262 .IX Item "%Module::CoreList::upstream"
263 A hash that contains information on where patches should be directed
264 for each core module.
265 .Sp
266 UPSTREAM indicates where patches should go. \f(CW\*(C`undef\*(C'\fR implies
267 that this hasn\*(Aqt been discussed for the module at hand.
268 \&\f(CW\*(C`blead\*(C'\fR indicates that the copy of the module in the blead
269 sources is to be considered canonical, \f(CW\*(C`cpan\*(C'\fR means that the
270 module on CPAN is to be patched first. \f(CW\*(C`first\-come\*(C'\fR means
271 that blead can be patched freely if it is in sync with the
272 latest release on CPAN.
273 .ie n .IP %Module::CoreList::bug_tracker 4
274 .el .IP \f(CW%Module::CoreList::bug_tracker\fR 4
275 .IX Item "%Module::CoreList::bug_tracker"
276 A hash that contains information on the appropriate bug tracker
277 for each core module.
278 .Sp
279 BUGS is an email or url to post bug reports. For modules with
280 UPSTREAM => \*(Aqblead\*(Aq, use <mailto:perl5\[email protected]>. rt.cpan.org
281 appears to automatically provide a URL for CPAN modules; any value
282 given here overrides the default:
283 <http://rt.cpan.org/Public/Dist/Display.html?Name=$ModuleName>
284 .SH CAVEATS
285 .IX Header "CAVEATS"
286 Module::CoreList currently covers the 5.000, 5.001, 5.002, 5.003_07,
287 5.004, 5.004_05, 5.005, 5.005_03, 5.005_04 and 5.7.3 releases of perl.
288 .PP
289 All stable releases of perl since 5.6.0 are covered.
290 .PP
291 All development releases of perl since 5.9.0 are covered.
292 .SH HISTORY
293 .IX Header "HISTORY"
294 Moved to Changes file.
295 .SH AUTHOR
296 .IX Header "AUTHOR"
297 Richard Clamp <[email protected]>
298 .PP
299 Currently maintained by the perl 5 porters <perl5\[email protected]>.
300 .SH LICENSE
301 .IX Header "LICENSE"
302 Copyright (C) 2002\-2009 Richard Clamp. All Rights Reserved.
303 .PP
304 This module is free software; you can redistribute it and/or modify it
305 under the same terms as Perl itself.
306 .SH "SEE ALSO"
307 .IX Header "SEE ALSO"
308 corelist, Module::Info, perl, <http://perlpunks.de/corelist>