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