This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Regression test for 34394ecd - SVs that were only on the tmps stack leaked.
[perl5.git] / Porting / how_to_write_a_perldelta.pod
CommitLineData
20a4c497
NC
1=head1 How to write a perldelta
2
3This is intended as a guide for how to write a perldelta. There has never
4been a formal specification - the working rule is "fake up a document that
5looks something close to the existing perldeltas". So if it's unclear how
6do to do something, see if it's been done before, and if the approach works
7there, steal it.
8
57b3b745
DM
9=head2 Template
10
11Note there is a file F<Porting/perldelta_template> which contains a
12skeleton version of a perldelta.pod file, which should normally be copied
13in at the start of a new release.
14
20a4c497
NC
15=head2 Style
16
17Pod is more a physical markup language, rather than a logical markup language.
18Despite that it has some built in conventions. B<Stick to them>:
19
20=over 4
21
22=item * C<FE<lt>E<gt>> is for File
23
24=item * C<CE<lt>E<gt>> is for Code
25
26=item * C<LE<lt>E<gt>> is for Link
27
28=back
29
30Whilst modules could also be links, usually in the context of the perldelta
31the reference is to code C<use>ing them, rather than something within their
32documentation.
33
34Be consistent in how bugs are referenced. One style is
35
36=over 4
37
38=item rt.perl.org
39
40C<RT #43010> inline, but enclose in square brackets after a sentence.
41C<[RT #43010]>
42
43=item ActiveState
44
45C<http://bugs.activestate.com/show_bug.cgi?id=72443>
46
47=item Debian
48
49C<Debian bug #379463>
50
51=back
52
53=head2 Copy editing
54
55Be consistent.
56
57In a list, either make every item a note, or a full sentence. Either end
f337e982
NC
58every item with a full stop, or ensure that no item ends with one. I<regex>
59B<xor> I<regexp> - choose exactly one, and stick to it.
20a4c497
NC
60
61=head2 Sections
62
63Historically, the perldelta has consisted of a sequence of C<=head1>
64sections, usually in the same order. Un-needed sections are deleted,
65and if something doesn't fit nicely into the existing sections, a new
66more appropriate section is created.
67
68=over
69
70=item NAME
71
72Follows this formula:
73
74 perl5104delta - what is new for perl v5.10.4
75
76=item DESCRIPTION
77
78For a release on a stable branch, follows this formula:
79
80 This document describes differences between the 5.10.3 release and
81 the 5.10.4 release.
82
83For the start of a new stable branch, follows this formula:
84
85 This document describes differences between the 5.12.0 release and
86 the 5.10.0 release.
87
68346ec5 88Clearly this sets the scope of which changes are to be summarised in the rest
20a4c497
NC
89of the document.
90
91=item Notice
92
93There was a I<Notice> section in L<perl589delta>, to carry an important
94notice.
95
96=item Incompatible Changes
97
98For a release on a stable branch, this section aspires to be
99
100 There are no changes intentionally incompatible with 5.10.3. If any exist,
101 they are bugs and reports are welcome.
102
103=item Core Enhancements
104
105New core language features go here. Summarise user-visible core language
106enhancements. Particularly prominent performance optimisations could go
107here, but most should go in the L</Performance Enhancements> section.
108
109Feature inside modules (pure-Perl and XS) go in L</Modules and Pragmata>
110
111=item New Platforms
112
113List any platforms that this version of perl compiles on, that previous
114versions did not. These will either be enabled by new files in the F<hints/>
115directories, or new subdirectories and F<README> files at the top level of the
116source tree.
117
118=item Modules and Pragmata
119
120All changes to installed files in F<ext/> and F<lib/> go here, in a list
121ordered by distribution name. Minimally it should be the module version,
122but it's more useful to the end user to give a paragraph's summary of the
123module's changes. In an ideal world, dual-life modules would have a
124F<Changes> file that could be cribbed.
125
126Whilst this section could be built by incrementally working through change
127descriptions applying to files, this is prone to error. It's better to
128collate changes to F<ext/> and F<lib/> by module, and then summarise all
129changes to a module as a group. This can be done by partitioning directories
130within F<ext/> and F<lib/> to a number of people.
131
60984f2f 132B<FIXME> - this could be automated better
0be987a2 133
60984f2f 134If Module::CoreList has been updated, then F<Porting/corelist-perldelta.pl>
88e14305
DG
135will automatically print out several sections if relevent that can be
136pasted into F<perldelta>:
137
138 * New Modules and Pragmata
139 * Pragmata Changes
140 * Updated Modules
141 * Removed Modules and Pragmata
142
143Each section will have stub entries following a template like this:
0be987a2 144
60984f2f 145 =item C<less>
0be987a2 146
60984f2f 147 Upgraded from version 0.01 to 0.02
0be987a2 148
88e14305
DG
149It does not include modules listed in F<Porting/Maintainers.pl> under
150C<_PERLLIB>, but it's a start. Where relevent, a summary of changes can be
151added by hand.
0be987a2 152
60984f2f 153A more adventurous enhancement would be to automate grabbing
0be987a2
NC
154the changelogs for dual lived modules. For each of them, grab the relevant
155changes files from CPAN for the old and new versions, and if the old one is
156a strict subset of the new one, splice the extra lines right into the output,
157as a basis for summarising.
158
159(And if not, experiment with using F<git> to get the relevant part of changelog
160for the particular file in core)
161
162These could also be enhanced further by using a Pod parser module to produce
163a parse tree of F<perl${whatever}delta.pod>, and splicing in the updates
164correctly without throwing existing entries away.
165
166If you think that's nuts, take a look at what F<pod/buildtoc> already does to
167splice into existing Makefiles on various platforms:
168
169http://perl5.git.perl.org/perl.git/blob/blead:/pod/buildtoc#l498
170
171Perl is this really powerful language for text manipulation. And fun to
172play with. We need to get that message out. :-)
173
20a4c497
NC
174=item Utility Changes
175
176Changes to installed programs such as F<perlbug> and F<xsubpp> go here. Most
177of these are built within the directories F<utils> and F<x2p>.
178
179=item New Documentation
180
181Changes which create B<new> files in F<pod/> go here.
182
0be987a2
NC
183B<FIXME> - this could be automated, at least as far as generating a first
184draft.
185
186=over
187
188=item 1
189
190Start with a clean exploded tarball of the previous release, and a clean
191checkout of the branch in question
192
193=item 2
194
195Take the F<MANIFEST> file of each
196
197=item 3
198
199Search for lines matching C<m!^pod/.*\.pod!>
200
201=item 4
202
203Diff them
204
205=item 5
206
207Explode if anyone deleted documentation. [No idea what the policy on that is
208yet]
209
210=item 6
211
212For each file only in the newer F<MANIFEST>
213
214=over
215
60984f2f 216=item 1
0be987a2
NC
217
218Use F<git> to determine its Author
219
220=item 2
221
222Open the pod file itself
223
224=item 3
225
226Grab the description section
227
228=item 4
229
230Write out a block of text starting roughly
231
232 L<perlfoo>, by A. U. Thor, provides @description
233
234=back
235
236=back
237
20a4c497
NC
238=item Changes to Existing Documentation
239
240Changes which significantly change existing files in F<pod/> go here.
241Any changes to F<pod/perldiag.pod> should go in
242L</New or Changed Diagnostics>.
243
244=item Performance Enhancements
245
246Changes which enhance performance without changing behaviour go here. There
247may well be none in a stable release.
248
249=item Installation and Configuration Improvements
250
251Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
252go here.
253
254=item Selected Bug Fixes
255
256Important bug fixes in the core language are summarised here.
257Bug fixes in files in F<ext/> and F<lib/> are best summarised in
258L</Modules and Pragmata>.
259
260=item New or Changed Diagnostics
261
262New or changed warnings emitted by the core's C<C> code go here.
263
264=item Changed Internals
265
266Changes which affect the interface available to C<XS> code go here.
267
268=item New Tests
269
270Changes which create B<new> files in F<t/> go here. Changes to existing files
271in F<t/> aren't worth summarising, although the bugs that they represent
272may be.
273
f95a4791 274Autogenerate this section by running something like this:
0be987a2 275
f95a4791 276 # perl newtests-perldelta.pl v5.11.1 HEAD
0be987a2 277
20a4c497
NC
278=item Known Problems
279
280Descriptions of platform agnostic bugs we know we can't fix go here. Any
281tests that had to be C<TODO>ed for the release would be noted here, unless
282they were specific to a particular platform (see below).
283
87b6d269
DM
284=item Deprecations
285
286Add any new known deprecations here.
287
20a4c497
NC
288=item Platform Specific Notes
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 Obituary
295
296If any significant core contributor has died, we've added a short obituary
297here.
298
299=item Acknowledgements
300
301The list of people to thank goes here.
302
a59108e8
LB
303You can find the list of committers and authors by:
304
06d5de52 305 % git log v5.11.1..HEAD | perl -nlwe '$seen{$1}++ if /^Author: ([^<]*)/; END { print for sort keys %seen }'
a59108e8
LB
306
307And how many files where changed by:
308
309 % git diff v5.11.1..HEAD | diffstat
310
20a4c497
NC
311=item Reporting Bugs
312
313This doesn't usually need to be changed from the previous perldelta.
314
315=item SEE ALSO
316
317This doesn't usually need to be changed from the previous perldelta.
318
319=back