NAME

how_to_write_a_perldelta - How to write a perldelta

Description

This is intended as a guide for how to write a perldelta. There has never been a formal specification - the working rule is "fake up a document that looks something close to the existing perldeltas". So if it's unclear how to do something, see if it's been done before, and if the approach works there, steal it. (perl5300delta and perl5320delta are both quite lengthy and contain good examples for many of the perldelta sections.)

Template Automation

Note that Porting/perldelta_template.pod contains a skeleton version of a perldelta.pod file. Following the steps in the Release Manager's Guide (Porting/release_managers_guide.pod) usually ensures hassle-free rotation of the most recently completed perldelta.pod and preparation of a fresh new document ready for the next release.

The skeleton document also contains inline hints on how to prepare the final perldelta.pod. (These hints should be removed in turn as each section of the final perldelta.pod is completed.)

Style

Pod is more a physical markup language, rather than a logical markup language. Despite that it has some built in conventions. Stick to them:

  • F<> is for File

  • C<> is for Code

  • L<> is for Link

Whilst modules could also be links, usually in the context of the perldelta the reference is to code useing them, rather than something within their documentation.

Be consistent in how bugs are referenced. One style is

GitHub

[GH #12345] can be used to reference both Issues and Pull Requests.

rt.cpan.org

rt.cpan.org #43010 inline, but enclose in square brackets after a sentence. [rt.cpan.org #43010]. This mirrors how rt.cpan.org subject lines appear.

ActiveState

http://bugs.activestate.com/show_bug.cgi?id=72443

Debian

Debian bug #379463

Copy editing

Be consistent.

In a list, either make every item a note, or a full sentence. Either end every item with a full stop, or ensure that no item ends with one. regex xor regexp - choose exactly one, and stick to it.

Sections

Historically, the perldelta has consisted of a sequence of =head1 sections, usually in the same order. Un-needed sections are deleted, and if something doesn't fit nicely into the existing sections, a new more appropriate section is created.

NAME

Follows this formula:

    perl5104delta - what is new for perl v5.10.4
DESCRIPTION

For a release on a stable branch, follows this formula:

    This document describes differences between the 5.10.3 release
    and the 5.10.4 release.

For the start of a new stable branch, follows this formula:

    This document describes differences between the 5.10.0 release
    and the 5.12.0 release.

This clearly sets the scope of which changes are to be summarized in the rest of the document.

For all releases, a second paragraph points to the previous perldelta:

    If you are upgrading from an earlier release such as 5.rXXX.aXXX,
    first read perl5XXXdelta, which describes differences between
    5.rXXX.aXXX and 5.sXXX.bXXX.
Notice

There was a Notice section in perl589delta, to carry an important notice.

Core Enhancements

New core language features go here. Summarize user-visible core language enhancements. Particularly prominent performance optimisations could go here, but most should go in the "Performance Enhancements" section.

Feature inside modules (pure-Perl and XS) go in "Modules and Pragmata"

Security

Any security-related notices go here. In particular, any security vulnerabilities closed should be noted here rather than in the "Selected Bug Fixes" section.

perl5303delta has multiple such examples, as well as a useful accompanying paragraph outlining the known attack vectors / requirements for the vulnerabilities to be exploitable.

Incompatible Changes

For a release on a stable branch, this section aspires to be

    There are no changes intentionally incompatible with 5.10.3.
    If any exist, they are bugs and reports are welcome.

Otherwise, changes should be listed as =head2 entries.

Deprecations

Add any new known deprecations (features, syntax, modules) here.

A Module removals subsection can be used to foreshadow planned removal of core modules in a future release. Modules that were actually removed in this release should go in the "Modules and Pragmata" section.

Performance Enhancements

Changes which enhance performance without changing behaviour go here. There may well be none in a stable release.

Modules and Pragmata

All changes to installed files in cpan/, dist/, ext/ and lib/ go here, in a list ordered by distribution name. Minimally it should be the module version, but it's more useful to the end user to give a paragraph's summary of the module's changes. In an ideal world, dual-life modules would have a Changes file that could be cribbed.

Whilst this section could be built by incrementally working through change descriptions applying to files, this is prone to error. It's better to collate changes by module, and then summarize all changes to a module as a group.

If Module::CoreList has been updated, then Porting/corelist-perldelta.pl will automatically update two sections in perldelta:

    * New Modules and Pragmata
    * Updated Modules and Pragmata
    * Removed Modules and Pragmata

Each section will have stub entries following a template like this:

    =item C<less>

    Upgraded from version 0.01 to 0.02

It does not include modules listed in Porting/Maintainers.pl under _PERLLIB, but it's a start. Where relevant, a summary of changes can be added by hand.

A more adventurous enhancement would be to automate grabbing the changelogs for dual lived modules. For each of them, grab the relevant changes files from CPAN for the old and new versions, and if the old one is a strict subset of the new one, use the extra lines as a basis for summarizing.

(And if not, experiment with using git to get the relevant part of changelog for the particular file in core.)

New Documentation

Changes which create new files in pod/ go here.

FIXME - this could be automated, at least as far as generating a first draft.

  1. Start with a clean exploded tarball of the previous release, and a clean checkout of the branch in question

  2. Take the MANIFEST file of each

  3. Search for lines matching m!^pod/.*\.pod!

  4. Diff them

  5. Explode if anyone deleted documentation. [No idea what the policy on that is yet]

  6. For each file only in the newer MANIFEST

    1. Use git to determine its Author

    2. Open the pod file itself

    3. Grab the description section

    4. Write out a block of text starting roughly

          L<perlfoo>, by A. U. Thor, provides @description
Changes to Existing Documentation

Changes which significantly change existing files in pod/ go here. Any changes to pod/perldiag.pod should go in "New Diagnostics" or "Changed Diagnostics".

New Diagnostics

New warnings emitted by the core's C code go here.

Changed Diagnostics

Changed warnings emitted by the core's C code go here.

Utility Changes

Changes to installed programs such as perldoc and xsubpp go here. Most of these are built within the directory utils.

Configuration and Compilation

Changes to Configure, installperl, installman, and analogous tools go here.

Testing

Changes which create new files in t/ go here. Changes to existing files in t/ aren't worth summarizing, although the bugs that they represent may be.

Autogenerate this section by running something like this:

 # perl newtests-perldelta.pl v5.11.1 HEAD
Platform Support

Any changes specific to a particular platform. VMS and Win32 are the usual stars here. It's probably best to group changes under the same section layout as the main perldelta.

New Platforms

List any platforms that this version of perl compiles on, that previous versions did not. These will either be enabled by new files in the hints/ directories, or new subdirectories and README files at the top level of the source tree.

Discontinued Platforms

List any platforms that this version of perl no longer compiles on. The reverse of the advice above applies - look for removed hints or README files.

Platform-Specific Notes

Changes of note to specific platforms go here.

Internal Changes

Changes which affect the interface available to XS code go here.

Selected Bug Fixes

Important bug fixes in the core language are summarized here. Bug fixes in files in ext/ and lib/ are best summarized in "Modules and Pragmata".

Known Problems

Descriptions of platform agnostic bugs we know we can't fix go here. Any tests that had to be TODOed for the release would be noted here, unless they were specific to a particular platform (see below).

Errata From Previous Releases

XXXXXXXXXX TODO

Obituary

If any significant core contributor has died, we've added a short obituary here.

Acknowledgements

Generate this with:

  perl Porting/acknowledgements.pl v5.15.0..HEAD
Reporting Bugs

This doesn't usually need to be changed from the previous perldelta.

Give Thanks

This doesn't usually need to be changed from the previous perldelta.

SEE ALSO

This doesn't usually need to be changed from the previous perldelta.