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