1Module::CoreList(3pm) Perl Programmers Reference Guide Module::CoreList(3pm)
2
3
4
6 Module::CoreList - what modules shipped with versions of perl
7
9 use Module::CoreList;
10
11 print $Module::CoreList::version{5.00503}{CPAN}; # prints 1.48
12
13 print Module::CoreList->first_release('File::Spec'); # prints 5.00405
14 print Module::CoreList->first_release_by_date('File::Spec'); # prints 5.005
15 print Module::CoreList->first_release('File::Spec', 0.82); # prints 5.006001
16
17 print join ', ', Module::CoreList->find_modules(qr/Data/);
18 # prints 'Data::Dumper'
19 print join ', ', Module::CoreList->find_modules(qr/test::h.*::.*s/i, 5.008008);
20 # prints 'Test::Harness::Assert, Test::Harness::Straps'
21
22 print join ", ", @{ $Module::CoreList::families{5.005} };
23 # prints "5.005, 5.00503, 5.00504"
24
26 Module::CoreList provides information on which core and dual-life
27 modules shipped with each version of perl.
28
29 It provides a number of mechanisms for querying this information.
30
31 There is a utility called corelist provided with this module which is a
32 convenient way of querying from the command-line.
33
34 There is a functional programming API available for programmers to
35 query information.
36
37 Programmers may also query the contained hash structures to find
38 relevant information.
39
41 These are the functions that are available, they may either be called
42 as functions or class methods:
43
44 Module::CoreList::first_release('File::Spec'); # as a function
45
46 Module::CoreList->first_release('File::Spec'); # class method
47
48 "first_release( MODULE )"
49 Behaviour since version 2.11
50
51 Requires a MODULE name as an argument, returns the perl version
52 when that module first appeared in core as ordered by perl version
53 number or undef ( in scalar context ) or an empty list ( in list
54 context ) if that module is not in core.
55
56 "first_release_by_date( MODULE )"
57 Requires a MODULE name as an argument, returns the perl version
58 when that module first appeared in core as ordered by release date
59 or undef ( in scalar context ) or an empty list ( in list context )
60 if that module is not in core.
61
62 "find_modules( REGEX, [ LIST OF PERLS ] )"
63 Takes a regex as an argument, returns a list of modules that match
64 the regex given. If only a regex is provided applies to all
65 modules in all perl versions. Optionally you may provide a list of
66 perl versions to limit the regex search.
67
68 "find_version( PERL_VERSION )"
69 Takes a perl version as an argument. Returns that perl version if
70 it exists or "undef" otherwise.
71
72 "is_deprecated( MODULE, PERL_VERSION )"
73 Available in version 2.22 and above.
74
75 Returns true if MODULE is marked as deprecated in PERL_VERSION. If
76 PERL_VERSION is omitted, it defaults to the current version of
77 Perl.
78
79 "removed_from( MODULE )"
80 Available in version 2.32 and above
81
82 Takes a module name as an argument, returns the first perl version
83 where that module was removed from core. Returns undef if the given
84 module was never in core or remains in core.
85
86 "removed_from_by_date( MODULE )"
87 Available in version 2.32 and above
88
89 Takes a module name as an argument, returns the first perl version
90 by release date where that module was removed from core. Returns
91 undef if the given module was never in core or remains in core.
92
93 "changes_between( PERL_VERSION, PERL_VERSION )"
94 Available in version 2.66 and above.
95
96 Given two perl versions, this returns a list of pairs describing
97 the changes in core module content betweent hem. The list is
98 suitable for storing in a hash. The keys are library names and the
99 values are hashrefs. Each hashref has an entry for one or both of
100 "left" and "right", giving the versions of the library in each of
101 the left and right perl distributions.
102
103 For example, it might return these data (among others) for the the
104 difference between 5.008000 and 5.008001:
105
106 'Pod::ParseLink' => { left => '1.05', right => '1.06' },
107 'Pod::ParseUtils' => { left => '0.22', right => '0.3' },
108 'Pod::Perldoc' => { right => '3.10' },
109 'Pod::Perldoc::BaseTo' => { right => undef },
110
111 This shows us two libraries being updated and two being added, one
112 of which has an undefined version in the right-hand side version.
113
115 These are the hash data structures that are available:
116
117 %Module::CoreList::version
118 A hash of hashes that is keyed on perl version as indicated in $].
119 The second level hash is module => version pairs.
120
121 Note, it is possible for the version of a module to be unspecified,
122 whereby the value is "undef", so use "exists $version{$foo}{$bar}"
123 if that's what you're testing for.
124
125 Starting with 2.10, the special module name "Unicode" refers to the
126 version of the Unicode Character Database bundled with Perl.
127
128 %Module::CoreList::released
129 Keyed on perl version this contains ISO formatted versions of the
130 release dates, as gleaned from perlhist.
131
132 %Module::CoreList::families
133 New, in 1.96, a hash that clusters known perl releases by their
134 major versions.
135
136 %Module::CoreList::deprecated
137 A hash of hashes keyed on perl version and on module name. If a
138 module is defined it indicates that that module is deprecated in
139 that perl version and is scheduled for removal from core at some
140 future point.
141
142 %Module::CoreList::upstream
143 A hash that contains information on where patches should be
144 directed for each core module.
145
146 UPSTREAM indicates where patches should go. "undef" implies that
147 this hasn't been discussed for the module at hand. "blead"
148 indicates that the copy of the module in the blead sources is to be
149 considered canonical, "cpan" means that the module on CPAN is to be
150 patched first. "first-come" means that blead can be patched freely
151 if it is in sync with the latest release on CPAN.
152
153 %Module::CoreList::bug_tracker
154 A hash that contains information on the appropriate bug tracker for
155 each core module.
156
157 BUGS is an email or url to post bug reports. For modules with
158 UPSTREAM => 'blead', use perl5-porters@perl.org. rt.cpan.org
159 appears to automatically provide a URL for CPAN modules; any value
160 given here overrides the default:
161 http://rt.cpan.org/Public/Dist/Display.html?Name=$ModuleName
162
164 Module::CoreList currently covers the 5.000, 5.001, 5.002, 5.003_07,
165 5.004, 5.004_05, 5.005, 5.005_03, 5.005_04, 5.6.0, 5.6.1, 5.6.2, 5.7.3,
166 5.8.0, 5.8.1, 5.8.2, 5.8.3, 5.8.4, 5.8.5, 5.8.6, 5.8.7, 5.8.8, 5.8.9,
167 5.9.0, 5.9.1, 5.9.2, 5.9.3, 5.9.4, 5.9.5, 5.10.0, 5.10.1, 5.11.0,
168 5.11.1, 5.11.2, 5.11.3, 5.11.4, 5.11.5, 5.12.0, 5.12.1, 5.12.2, 5.12.3,
169 5.12.4, 5.13.0, 5.13.1, 5.13.2, 5.13.3, 5.13.4, 5.13.5, 5.13.6, 5.13.7,
170 5.13.8, 5.13.9, 5.13.10, 5.13.11, 5.14.0, 5.14.1, 5.14.2, 5.15.0,
171 5.15.1, 5.15.2, 5.15.3, 5.15.4, 5.15.5, 5.15.6, 5.15.7, 5.15.8, 5.15.9,
172 5.16.0, 5.17.0, 5.17.1, 5.17.2, 5.17.3, 5.17.4 and 5.17.5 releases of
173 perl.
174
176 Moved to Changes file.
177
179 Richard Clamp <richardc@unixbeard.net>
180
181 Currently maintained by the perl 5 porters <perl5-porters@perl.org>.
182
184 Copyright (C) 2002-2009 Richard Clamp. All Rights Reserved.
185
186 This module is free software; you can redistribute it and/or modify it
187 under the same terms as Perl itself.
188
190 corelist, Module::Info, perl, <http://perlpunks.de/corelist>
191
192
193
194perl v5.16.3 2013-03-04 Module::CoreList(3pm)