This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
checkAUTHORS.pl - allow the script to be used as a module.
[perl5.git] / Porting / how_to_write_a_perldelta.pod
CommitLineData
3d6c5fec
DG
1=head1 NAME
2
3how_to_write_a_perldelta - How to write a perldelta
4
5=head2 Description
20a4c497
NC
6
7This is intended as a guide for how to write a perldelta. There has never
8been a formal specification - the working rule is "fake up a document that
9looks something close to the existing perldeltas". So if it's unclear how
919671d7 10to do something, see if it's been done before, and if the approach works
b56e599f
RL
11there, steal it. (L<perl5300delta> and L<perl5320delta> are both quite
12lengthy and contain good examples for many of the perldelta sections.)
20a4c497 13
b56e599f 14=head2 Template Automation
57b3b745 15
b56e599f
RL
16Note that F<Porting/perldelta_template.pod> contains a skeleton version of
17a perldelta.pod file. Following the steps in the Release Manager's Guide
18(F<Porting/release_managers_guide.pod>) usually ensures hassle-free
19rotation of the most recently completed perldelta.pod and preparation of
20a fresh new document ready for the next release.
21
22The skeleton document also contains inline hints on how to prepare the
23final perldelta.pod. (These hints should be removed in turn as each section
24of the final perldelta.pod is completed.)
57b3b745 25
20a4c497
NC
26=head2 Style
27
28Pod is more a physical markup language, rather than a logical markup language.
29Despite that it has some built in conventions. B<Stick to them>:
30
31=over 4
32
33=item * C<FE<lt>E<gt>> is for File
34
35=item * C<CE<lt>E<gt>> is for Code
36
37=item * C<LE<lt>E<gt>> is for Link
38
39=back
40
41Whilst modules could also be links, usually in the context of the perldelta
42the reference is to code C<use>ing them, rather than something within their
43documentation.
44
45Be consistent in how bugs are referenced. One style is
46
47=over 4
48
b56e599f
RL
49=item GitHub
50
51C<[GH #12345]> can be used to reference both Issues and Pull Requests.
52
5cfe25fd
DG
53=item rt.cpan.org
54
55C<rt.cpan.org #43010> inline, but enclose in square brackets after a sentence.
56C<[rt.cpan.org #43010]>. This mirrors how rt.cpan.org subject lines appear.
20a4c497
NC
57
58=item ActiveState
59
4b05bc8e 60C<L<http://bugs.activestate.com/show_bug.cgi?id=72443>>
20a4c497
NC
61
62=item Debian
63
64C<Debian bug #379463>
65
66=back
67
68=head2 Copy editing
69
70Be consistent.
71
72In a list, either make every item a note, or a full sentence. Either end
f337e982
NC
73every item with a full stop, or ensure that no item ends with one. I<regex>
74B<xor> I<regexp> - choose exactly one, and stick to it.
20a4c497
NC
75
76=head2 Sections
77
78Historically, the perldelta has consisted of a sequence of C<=head1>
79sections, usually in the same order. Un-needed sections are deleted,
80and if something doesn't fit nicely into the existing sections, a new
81more appropriate section is created.
82
83=over
84
85=item NAME
86
87Follows this formula:
88
89 perl5104delta - what is new for perl v5.10.4
90
91=item DESCRIPTION
92
93For a release on a stable branch, follows this formula:
94
555bd962
BG
95 This document describes differences between the 5.10.3 release
96 and the 5.10.4 release.
20a4c497
NC
97
98For the start of a new stable branch, follows this formula:
99
14074713
KE
100 This document describes differences between the 5.10.0 release
101 and the 5.12.0 release.
20a4c497 102
b56e599f
RL
103This clearly sets the scope of which changes are to be summarized in the
104rest of the document.
105
106For all releases, a second paragraph points to the previous perldelta:
107
108 If you are upgrading from an earlier release such as 5.rXXX.aXXX,
109 first read perl5XXXdelta, which describes differences between
110 5.rXXX.aXXX and 5.sXXX.bXXX.
20a4c497
NC
111
112=item Notice
113
114There was a I<Notice> section in L<perl589delta>, to carry an important
115notice.
116
b56e599f
RL
117=item Core Enhancements
118
119New core language features go here. Summarize user-visible core language
120enhancements. Particularly prominent performance optimisations could go
121here, but most should go in the L</Performance Enhancements> section.
122
123Feature inside modules (pure-Perl and XS) go in L</Modules and Pragmata>
124
125=item Security
126
127Any security-related notices go here. In particular, any security
128vulnerabilities closed should be noted here rather than in the
129"Selected Bug Fixes" section.
130
131L<perl5303delta> has multiple such examples, as well as
132a useful accompanying paragraph outlining the known attack
133vectors / requirements for the vulnerabilities to be exploitable.
134
20a4c497
NC
135=item Incompatible Changes
136
137For a release on a stable branch, this section aspires to be
138
555bd962
BG
139 There are no changes intentionally incompatible with 5.10.3.
140 If any exist, they are bugs and reports are welcome.
20a4c497 141
b56e599f 142Otherwise, changes should be listed as =head2 entries.
20a4c497 143
b56e599f 144=item Deprecations
20a4c497 145
b56e599f 146Add any new known deprecations (features, syntax, modules) here.
20a4c497 147
b56e599f
RL
148A I<Module removals> subsection can be used to foreshadow planned removal
149of core modules in a future release. Modules that were actually removed
150in this release should go in the "Modules and Pragmata" section.
20a4c497 151
b56e599f
RL
152=item Performance Enhancements
153
154Changes which enhance performance without changing behaviour go here. There
155may well be none in a stable release.
20a4c497
NC
156
157=item Modules and Pragmata
158
2c5d738b
SH
159All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> go
160here, in a list ordered by distribution name. Minimally it should be the
161module version, but it's more useful to the end user to give a paragraph's
162summary of the module's changes. In an ideal world, dual-life modules would
163have a F<Changes> file that could be cribbed.
20a4c497
NC
164
165Whilst this section could be built by incrementally working through change
166descriptions applying to files, this is prone to error. It's better to
b56e599f 167collate changes by module, and then summarize all changes to a module as a
2c5d738b 168group.
0be987a2 169
60984f2f 170If Module::CoreList has been updated, then F<Porting/corelist-perldelta.pl>
2c5d738b 171will automatically update two sections in F<perldelta>:
88e14305
DG
172
173 * New Modules and Pragmata
2c5d738b 174 * Updated Modules and Pragmata
b56e599f 175 * Removed Modules and Pragmata
88e14305
DG
176
177Each section will have stub entries following a template like this:
0be987a2 178
60984f2f 179 =item C<less>
0be987a2 180
60984f2f 181 Upgraded from version 0.01 to 0.02
0be987a2 182
88e14305 183It does not include modules listed in F<Porting/Maintainers.pl> under
47e01c32 184C<_PERLLIB>, but it's a start. Where relevant, a summary of changes can be
88e14305 185added by hand.
0be987a2 186
60984f2f 187A more adventurous enhancement would be to automate grabbing
0be987a2
NC
188the changelogs for dual lived modules. For each of them, grab the relevant
189changes files from CPAN for the old and new versions, and if the old one is
b56e599f 190a strict subset of the new one, use the extra lines as a basis for summarizing.
0be987a2
NC
191
192(And if not, experiment with using F<git> to get the relevant part of changelog
2c5d738b 193for the particular file in core.)
0be987a2 194
20a4c497
NC
195=item New Documentation
196
197Changes which create B<new> files in F<pod/> go here.
198
0be987a2
NC
199B<FIXME> - this could be automated, at least as far as generating a first
200draft.
201
202=over
203
204=item 1
205
206Start with a clean exploded tarball of the previous release, and a clean
207checkout of the branch in question
208
209=item 2
210
211Take the F<MANIFEST> file of each
212
213=item 3
214
215Search for lines matching C<m!^pod/.*\.pod!>
216
217=item 4
218
219Diff them
220
221=item 5
222
223Explode if anyone deleted documentation. [No idea what the policy on that is
224yet]
225
226=item 6
227
228For each file only in the newer F<MANIFEST>
229
230=over
231
60984f2f 232=item 1
0be987a2
NC
233
234Use F<git> to determine its Author
235
236=item 2
237
238Open the pod file itself
239
240=item 3
241
242Grab the description section
243
244=item 4
245
246Write out a block of text starting roughly
247
248 L<perlfoo>, by A. U. Thor, provides @description
249
250=back
251
252=back
253
20a4c497
NC
254=item Changes to Existing Documentation
255
256Changes which significantly change existing files in F<pod/> go here.
257Any changes to F<pod/perldiag.pod> should go in
b56e599f 258L</New Diagnostics> or L</Changed Diagnostics>.
20a4c497 259
b56e599f 260=item New Diagnostics
20a4c497 261
b56e599f 262New warnings emitted by the core's C<C> code go here.
20a4c497 263
b56e599f 264=item Changed Diagnostics
20a4c497 265
b56e599f 266Changed warnings emitted by the core's C<C> code go here.
20a4c497 267
b56e599f 268=item Utility Changes
20a4c497 269
b56e599f
RL
270Changes to installed programs such as F<perldoc> and F<xsubpp> go here. Most
271of these are built within the directory F<utils>.
20a4c497 272
b56e599f 273=item Configuration and Compilation
20a4c497 274
b56e599f
RL
275Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
276go here.
20a4c497 277
b56e599f 278=item Testing
20a4c497
NC
279
280Changes which create B<new> files in F<t/> go here. Changes to existing files
b56e599f 281in F<t/> aren't worth summarizing, although the bugs that they represent
20a4c497
NC
282may be.
283
f95a4791 284Autogenerate this section by running something like this:
0be987a2 285
f95a4791 286 # perl newtests-perldelta.pl v5.11.1 HEAD
0be987a2 287
b56e599f
RL
288=item Platform Support
289
290Any changes specific to a particular platform. VMS and Win32 are the usual
291stars here. It's probably best to group changes under the same section layout
292as the main perldelta.
293
294=item New Platforms
295
296List any platforms that this version of perl compiles on, that previous
297versions did not. These will either be enabled by new files in the F<hints/>
298directories, or new subdirectories and F<README> files at the top level of the
299source tree.
300
301=item Discontinued Platforms
302
303List any platforms that this version of perl no longer compiles on. The
304reverse of the advice above applies - look for removed hints or README files.
305
306=item Platform-Specific Notes
307
308Changes of note to specific platforms go here.
309
310=item Internal Changes
311
312Changes which affect the interface available to C<XS> code go here.
313
314=item Selected Bug Fixes
315
316Important bug fixes in the core language are summarized here.
317Bug fixes in files in F<ext/> and F<lib/> are best summarized in
318L</Modules and Pragmata>.
319
20a4c497
NC
320=item Known Problems
321
322Descriptions of platform agnostic bugs we know we can't fix go here. Any
323tests that had to be C<TODO>ed for the release would be noted here, unless
324they were specific to a particular platform (see below).
325
b56e599f 326=item Errata From Previous Releases
87b6d269 327
b56e599f 328XXXXXXXXXX TODO
20a4c497
NC
329
330=item Obituary
331
332If any significant core contributor has died, we've added a short obituary
333here.
334
335=item Acknowledgements
336
548e9a3a 337Generate this with:
20a4c497 338
548e9a3a 339 perl Porting/acknowledgements.pl v5.15.0..HEAD
a59108e8 340
20a4c497
NC
341=item Reporting Bugs
342
343This doesn't usually need to be changed from the previous perldelta.
344
b56e599f
RL
345=item Give Thanks
346
347This doesn't usually need to be changed from the previous perldelta.
348
20a4c497
NC
349=item SEE ALSO
350
351This doesn't usually need to be changed from the previous perldelta.
352
353=back