This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
maint policy: Separate build/installation issues from test failures
[perl5.git] / pod / perlpolicy.pod
CommitLineData
3db23aec
SH
1=encoding utf8
2
48cb5b3a 3=head1 NAME
3c78fafa 4
9a7064ee 5perlpolicy - Various and sundry policies and commitments related to the Perl core
48cb5b3a
JV
6
7=head1 DESCRIPTION
8
9This document is the master document which records all written
10policies about how the Perl 5 Porters collectively develop and maintain
11the Perl core.
12
a101a770
JV
13=head1 GOVERNANCE
14
15=head2 Perl 5 Porters
16
17Subscribers to perl5-porters (the porters themselves) come in several flavours.
18Some are quiet curious lurkers, who rarely pitch in and instead watch
19the ongoing development to ensure they're forewarned of new changes or
20features in Perl. Some are representatives of vendors, who are there
21to make sure that Perl continues to compile and work on their
22platforms. Some patch any reported bug that they know how to fix,
23some are actively patching their pet area (threads, Win32, the regexp
24-engine), while others seem to do nothing but complain. In other
25words, it's your usual mix of technical people.
26
27Over this group of porters presides Larry Wall. He has the final word
28in what does and does not change in any of the Perl programming languages.
29These days, Larry spends most of his time on Perl 6, while Perl 5 is
30shepherded by a "pumpking", a porter responsible for deciding what
31goes into each release and ensuring that releases happen on a regular
32basis.
33
34Larry sees Perl development along the lines of the US government:
35there's the Legislature (the porters), the Executive branch (the
36-pumpking), and the Supreme Court (Larry). The legislature can
37discuss and submit patches to the executive branch all they like, but
38the executive branch is free to veto them. Rarely, the Supreme Court
39will side with the executive branch over the legislature, or the
40legislature over the executive branch. Mostly, however, the
41legislature and the executive branch are supposed to get along and
42work out their differences without impeachment or court cases.
43
44You might sometimes see reference to Rule 1 and Rule 2. Larry's power
45as Supreme Court is expressed in The Rules:
46
47=over 4
48
49=item 1
50
51Larry is always by definition right about how Perl should behave.
52This means he has final veto power on the core functionality.
53
54=item 2
55
56Larry is allowed to change his mind about any matter at a later date,
57regardless of whether he previously invoked Rule 1.
58
59=back
60
61Got that? Larry is always right, even when he was wrong. It's rare
62to see either Rule exercised, but they are often alluded to.
63
70eadc36
JV
64=head1 MAINTENANCE AND SUPPORT
65
66Perl 5 is developed by a community, not a corporate entity. Every change
67contributed to the Perl core is the result of a donation. Typically, these
68donations are contributions of code or time by individual members of our
69community. On occasion, these donations come in the form of corporate
70or organizational sponsorship of a particular individual or project.
71
72As a volunteer organization, the commitments we make are heavily dependent
73on the goodwill and hard work of individuals who have no obligation to
74contribute to Perl.
75
3b4ebcde 76That being said, we value Perl's stability and security and have long
70eadc36
JV
77had an unwritten covenant with the broader Perl community to support
78and maintain releases of Perl.
79
80This document codifies the support and maintenance commitments that
81the Perl community should expect from Perl's developers:
82
83=over
84
85=item *
86
cdf175f7
SH
87We "officially" support the two most recent stable release series. 5.14.x
88and earlier are now out of support. As of the release of 5.20.0, we will
89"officially" end support for Perl 5.16.x, other than providing security
70eadc36
JV
90updates as described below.
91
92=item *
93
94To the best of our ability, we will attempt to fix critical issues
e26b5c49 95in the two most recent stable 5.x release series. Fixes for the
70eadc36
JV
96current release series take precedence over fixes for the previous
97release series.
98
99=item *
100
101To the best of our ability, we will provide "critical" security patches
f50f542d 102/ releases for any major version of Perl whose 5.x.0 release was within
70a565f4
RS
103the past three years. We can only commit to providing these for the
104most recent .y release in any 5.x.y series.
70eadc36
JV
105
106=item *
107
108We will not provide security updates or bug fixes for development
109releases of Perl.
110
111=item *
112
113We encourage vendors to ship the most recent supported release of
114Perl at the time of their code freeze.
115
116=item *
117
118As a vendor, you may have a requirement to backport security fixes
119beyond our 3 year support commitment. We can provide limited support and
120advice to you as you do so and, where possible will try to apply
121those patches to the relevant -maint branches in git, though we may or
122may not choose to make numbered releases or "official" patches
123available. Contact us at E<lt>perl5-security-report@perl.orgE<gt>
124to begin that process.
125
126=back
127
70e4a83b
JV
128=head1 BACKWARD COMPATIBILITY AND DEPRECATION
129
130Our community has a long-held belief that backward-compatibility is a
131virtue, even when the functionality in question is a design flaw.
132
133We would all love to unmake some mistakes we've made over the past
134decades. Living with every design error we've ever made can lead
135to painful stagnation. Unwinding our mistakes is very, very
136difficult. Doing so without actively harming our users is
137nearly impossible.
138
139Lately, ignoring or actively opposing compatibility with earlier versions
140of Perl has come into vogue. Sometimes, a change is proposed which
141wants to usurp syntax which previously had another meaning. Sometimes,
339a461d 142a change wants to improve previously-crazy semantics.
70e4a83b
JV
143
144Down this road lies madness.
145
146Requiring end-user programmers to change just a few language constructs,
147even language constructs which no well-educated developer would ever
148intentionally use is tantamount to saying "you should not upgrade to
149a new release of Perl unless you have 100% test coverage and can do a
150full manual audit of your codebase." If we were to have tools capable of
151reliably upgrading Perl source code from one version of Perl to another,
152this concern could be significantly mitigated.
153
154We want to ensure that Perl continues to grow and flourish in the coming
155years and decades, but not at the expense of our user community.
156
157Existing syntax and semantics should only be marked for destruction in
1adbeba0 158very limited circumstances. If they are believed to be very rarely used,
667f5e7f
RS
159stand in the way of actual improvement to the Perl language or perl
160interpreter, and if affected code can be easily updated to continue
161working, they may be considered for removal. When in doubt, caution
162dictates that we will favor backward compatibility. When a feature is
163deprecated, a statement of reasoning describing the decision process
164will be posted, and a link to it will be provided in the relevant
165perldelta documents.
5ae454f0
RS
166
167Using a lexical pragma to enable or disable legacy behavior should be
168considered when appropriate, and in the absence of any pragma legacy
169behavior should be enabled. Which backward-incompatible changes are
170controlled implicitly by a 'use v5.x.y' is a decision which should be
171made by the pumpking in consultation with the community.
70e4a83b
JV
172
173Historically, we've held ourselves to a far higher standard than
174backward-compatibility -- bugward-compatibility. Any accident of
175implementation or unintentional side-effect of running some bit of code
176has been considered to be a feature of the language to be defended with
177the same zeal as any other feature or functionality. No matter how
178frustrating these unintentional features may be to us as we continue
179to improve Perl, these unintentional features often deserve our
180protection. It is very important that existing software written in
181Perl continue to work correctly. If end-user developers have adopted a
182bug as a feature, we need to treat it as such.
183
184New syntax and semantics which don't break existing language constructs
185and syntax have a much lower bar. They merely need to prove themselves
b50cfd0a
RS
186to be useful, elegant, well designed, and well tested. In most cases,
187these additions will be marked as I<experimental> for some time. See
188below for more on that.
70e4a83b
JV
189
190=head2 Terminology
191
192To make sure we're talking about the same thing when we discuss the removal
193of features or functionality from the Perl core, we have specific definitions
194for a few words and phrases.
195
196=over
197
198=item experimental
199
200If something in the Perl core is marked as B<experimental>, we may change
201its behaviour, deprecate or remove it without notice. While we'll always
202do our best to smooth the transition path for users of experimental
203features, you should contact the perl5-porters mailinglist if you find
204an experimental feature useful and want to help shape its future.
205
f1126a90
RS
206Experimental features must be experimental in two stable releases before being
207marked non-experimental. Experimental features will only have their
208experimental status revoked when they no longer have any design-changing bugs
209open against them and when they have remained unchanged in behavior for the
210entire length of a development cycle. In other words, a feature present in
211v5.20.0 may be marked no longer experimental in v5.22.0 if and only if its
212behavior is unchanged throughout all of v5.21.
213
70e4a83b
JV
214=item deprecated
215
216If something in the Perl core is marked as B<deprecated>, we may remove it
5c5fd8eb
KW
217from the core in the future, though we might not. Generally, backward
218incompatible changes will have deprecation warnings for two release
219cycles before being removed, but may be removed after just one cycle if
220the risk seems quite low or the benefits quite high.
221
222As of
70e4a83b 223Perl 5.12, deprecated features and modules warn the user as they're used.
42b68fb1
DG
224When a module is deprecated, it will also be made available on CPAN.
225Installing it from CPAN will silence deprecation warnings for that module.
226
227If you use a deprecated feature or module and believe that its removal from
228the Perl core would be a mistake, please contact the perl5-porters
229mailinglist and plead your case. We don't deprecate things without a good
230reason, but sometimes there's a counterargument we haven't considered.
231Historically, we did not distinguish between "deprecated" and "discouraged"
232features.
70e4a83b
JV
233
234=item discouraged
235
236From time to time, we may mark language constructs and features which we
237consider to have been mistakes as B<discouraged>. Discouraged features
5c5fd8eb 238aren't currently candidates for removal, but
70e4a83b 239we may later deprecate them if they're found to stand in the way of a
9a7064ee 240significant improvement to the Perl core.
70e4a83b
JV
241
242=item removed
243
5c5fd8eb
KW
244Once a feature, construct or module has been marked as deprecated, we
245may remove it from the Perl core. Unsurprisingly,
42b68fb1
DG
246we say we've B<removed> these things. When a module is removed, it will
247no longer ship with Perl, but will continue to be available on CPAN.
70e4a83b
JV
248
249=back
48cb5b3a 250
fcf56c88
JV
251=head1 MAINTENANCE BRANCHES
252
fcf56c88
JV
253New releases of maint should contain as few changes as possible.
254If there is any question about whether a given patch might merit
255inclusion in a maint release, then it almost certainly should not
256be included.
257
c792d632
SH
258The following types of change may be considered acceptable, as long as they do
259not also fall into any of the "unacceptable" categories set out below:
260
261=over
262
fcf56c88
JV
263=item *
264
79f83602 265Patches that fix CVEs or security issues. These changes should
64b35da5
SH
266be run through the perl5-security-report@perl.org mailing list
267rather than applied directly.
fcf56c88
JV
268
269=item *
270
4c0ef208
FC
271Patches that fix crashing bugs, assertion failures and
272memory corruption that do not otherwise change Perl's
79f83602 273functionality or negatively impact performance.
fcf56c88
JV
274
275=item *
276
56b40e63 277Patches that fix regressions in perl's behavior relative to previous
fc088d5f
SH
278releases, no matter how old the regression, since some people may
279upgrade from very old versions of perl to the latest version.
56b40e63
RS
280
281=item *
282
e2b7b23f
SH
283Patches that fix anything which prevents or seriously impacts the build
284or installation of perl.
285
286=item *
287
64b35da5 288Portability fixes, such as changes to Configure and the files in
79f83602 289the hints/ folder.
fcf56c88
JV
290
291=item *
292
e2b7b23f 293Minimal patches that fix platform-specific test failures.
27d0393b 294
64b35da5
SH
295=item *
296
79f83602
SH
297Documentation updates that correct factual errors, explain significant
298bugs or deficiencies in the current implementation, or fix broken markup.
64b35da5
SH
299
300=item *
301
302Updates to dual-life modules should consist of minimal patches to
b33e5804
SH
303fix crashing bugs or security issues (as above). Any changes made to
304dual-life modules for which CPAN is canonical should be coordinated with
305the upstream author.
64b35da5 306
c792d632
SH
307=back
308
309The following types of change are NOT acceptable:
310
311=over
312
313=item *
314
79f83602 315Patches that break binary compatibility. (Please talk to a pumpking.)
c792d632
SH
316
317=item *
318
79f83602 319Patches that add or remove features.
c792d632 320
27d0393b
JV
321=item *
322
79f83602 323Patches that add new warnings or errors or deprecate features.
fcf56c88
JV
324
325=item *
326
79f83602
SH
327Ports of Perl to a new platform, architecture or OS release that
328involve changes to the implementation.
fcf56c88
JV
329
330=item *
331
64b35da5
SH
332New versions of dual-life modules should NOT be imported into maint.
333Those belong in the next stable series.
fcf56c88
JV
334
335=back
336
fcf56c88
JV
337=head2 Getting changes into a maint branch
338
339Historically, only the pumpking cherry-picked changes from bleadperl
e566981e 340into maintperl. This has scaling problems. At the same time,
fcf56c88 341maintenance branches of stable versions of Perl need to be treated with
e566981e
DG
342great care. To that end, as of Perl 5.12, we have a new process for
343maint branches.
fcf56c88 344
e566981e 345Any committer may cherry-pick any commit from blead to a maint branch if
fcf56c88 346they send mail to perl5-porters announcing their intent to cherry-pick
17c80487 347a specific commit along with a rationale for doing so and at least two
fcf56c88
JV
348other committers respond to the list giving their assent. (This policy
349applies to current and former pumpkings, as well as other committers.)
48cb5b3a
JV
350
351=head1 CONTRIBUTED MODULES
352
353
354=head2 A Social Contract about Artistic Control
6ee623d5
GS
355
356What follows is a statement about artistic control, defined as the ability
357of authors of packages to guide the future of their code and maintain
358control over their work. It is a recognition that authors should have
359control over their work, and that it is a responsibility of the rest of
360the Perl community to ensure that they retain this control. It is an
361attempt to document the standards to which we, as Perl developers, intend
362to hold ourselves. It is an attempt to write down rough guidelines about
363the respect we owe each other as Perl developers.
364
365This statement is not a legal contract. This statement is not a legal
366document in any way, shape, or form. Perl is distributed under the GNU
367Public License and under the Artistic License; those are the precise legal
368terms. This statement isn't about the law or licenses. It's about
369community, mutual respect, trust, and good-faith cooperation.
370
371We recognize that the Perl core, defined as the software distributed with
372the heart of Perl itself, is a joint project on the part of all of us.
aaa2bbb1 373From time to time, a script, module, or set of modules (hereafter referred
6ee623d5
GS
374to simply as a "module") will prove so widely useful and/or so integral to
375the correct functioning of Perl itself that it should be distributed with
9a7064ee 376the Perl core. This should never be done without the author's explicit
6ee623d5
GS
377consent, and a clear recognition on all parts that this means the module
378is being distributed under the same terms as Perl itself. A module author
379should realize that inclusion of a module into the Perl core will
380necessarily mean some loss of control over it, since changes may
381occasionally have to be made on short notice or for consistency with the
382rest of Perl.
383
384Once a module has been included in the Perl core, however, everyone
385involved in maintaining Perl should be aware that the module is still the
386property of the original author unless the original author explicitly
387gives up their ownership of it. In particular:
388
48cb5b3a
JV
389=over
390
171407a0
JJ
391=item *
392
9a7064ee 393The version of the module in the Perl core should still be considered the
171407a0
JJ
394work of the original author. All patches, bug reports, and so
395forth should be fed back to them. Their development directions
396should be respected whenever possible.
6ee623d5 397
48cb5b3a
JV
398=item *
399
400Patches may be applied by the pumpkin holder without the explicit
401cooperation of the module author if and only if they are very minor,
402time-critical in some fashion (such as urgent security fixes), or if
403the module author cannot be reached. Those patches must still be
404given back to the author when possible, and if the author decides on
405an alternate fix in their version, that fix should be strongly
406preferred unless there is a serious problem with it. Any changes not
407endorsed by the author should be marked as such, and the contributor
408of the change acknowledged.
409
410=item *
411
412The version of the module distributed with Perl should, whenever
413possible, be the latest version of the module as distributed by the
414author (the latest non-beta version in the case of public Perl
415releases), although the pumpkin holder may hold off on upgrading the
416version of the module distributed with Perl to the latest version
417until the latest version has had sufficient testing.
418
419=back
6ee623d5
GS
420
421In other words, the author of a module should be considered to have final
422say on modifications to their module whenever possible (bearing in mind
423that it's expected that everyone involved will work together and arrive at
424reasonable compromises when there are disagreements).
425
426As a last resort, however:
427
48cb5b3a
JV
428
429If the author's vision of the future of their module is sufficiently
430different from the vision of the pumpkin holder and perl5-porters as a
431whole so as to cause serious problems for Perl, the pumpkin holder may
9a7064ee 432choose to formally fork the version of the module in the Perl core from the
48cb5b3a 433one maintained by the author. This should not be done lightly and
c4f5d98d 434should B<always> if at all possible be done only after direct input
48cb5b3a 435from Larry. If this is done, it must then be made explicit in the
9a7064ee 436module as distributed with the Perl core that it is a forked version and
48cb5b3a
JV
437that while it is based on the original author's work, it is no longer
438maintained by them. This must be noted in both the documentation and
439in the comments in the source of the module.
6ee623d5
GS
440
441Again, this should be a last resort only. Ideally, this should never
442happen, and every possible effort at cooperation and compromise should be
443made before doing this. If it does prove necessary to fork a module for
444the overall health of Perl, proper credit must be given to the original
445author in perpetuity and the decision should be constantly re-evaluated to
446see if a remerging of the two branches is possible down the road.
447
448In all dealings with contributed modules, everyone maintaining Perl should
449keep in mind that the code belongs to the original author, that they may
450not be on perl5-porters at any given time, and that a patch is not
451official unless it has been integrated into the author's copy of the
452module. To aid with this, and with points #1, #2, and #3 above, contact
453information for the authors of all contributed modules should be kept with
454the Perl distribution.
455
456Finally, the Perl community as a whole recognizes that respect for
457ownership of code, respect for artistic control, proper credit, and active
458effort to prevent unintentional code skew or communication gaps is vital
459to the health of the community and Perl itself. Members of a community
460should not normally have to resort to rules and laws to deal with each
461other, and this document, although it contains rules so as to be clear, is
462about an attitude and general approach. The first step in any dispute
463should be open communication, respect for opposing views, and an attempt
464at a compromise. In nearly every circumstance nothing more will be
465necessary, and certainly no more drastic measure should be used until
466every avenue of communication and discussion has failed.
3c78fafa 467
70e4a83b 468
3b4ebcde
JV
469=head1 DOCUMENTATION
470
471Perl's documentation is an important resource for our users. It's
472incredibly important for Perl's documentation to be reasonably coherent
473and to accurately reflect the current implementation.
474
475Just as P5P collectively maintains the codebase, we collectively
476maintain the documentation. Writing a particular bit of documentation
477doesn't give an author control of the future of that documentation.
478At the same time, just as source code changes should match the style
479of their surrounding blocks, so should documentation changes.
480
481Examples in documentation should be illustrative of the concept
482they're explaining. Sometimes, the best way to show how a
483language feature works is with a small program the reader can
484run without modification. More often, examples will consist
485of a snippet of code containing only the "important" bits.
486The definition of "important" varies from snippet to snippet.
1bb8a155 487Sometimes it's important to declare C<use strict> and C<use warnings>,
3b4ebcde
JV
488initialize all variables and fully catch every error condition.
489More often than not, though, those things obscure the lesson
490the example was intended to teach.
491
492As Perl is developed by a global team of volunteers, our
493documentation often contains spellings which look funny
494to I<somebody>. Choice of American/British/Other spellings
495is left as an exercise for the author of each bit of
496documentation. When patching documentation, try to emulate
497the documentation around you, rather than changing the existing
498prose.
499
500In general, documentation should describe what Perl does "now" rather
501than what it used to do. It's perfectly reasonable to include notes
502in documentation about how behaviour has changed from previous releases,
9e9fdd5d 503but, with very few exceptions, documentation isn't "dual-life" --
3b4ebcde
JV
504it doesn't need to fully describe how all old versions used to work.
505
17c80487
RS
506=head1 STANDARDS OF CONDUCT
507
508The official forum for the development of perl is the perl5-porters mailing
509list, mentioned above, and its bugtracker at rt.perl.org. All participants in
510discussion there are expected to adhere to a standard of conduct.
511
512=over 4
513
514=item *
515
516Always be civil.
517
518=item *
519
520Heed the moderators.
521
522=back
523
524Civility is simple: stick to the facts while avoiding demeaning remarks and
525sarcasm. It is not enough to be factual. You must also be civil. Responding
526in kind to incivility is not acceptable.
527
528If the list moderators tell you that you are not being civil, carefully
529consider how your words have appeared before responding in any way. You may
530protest, but repeated protest in the face of a repeatedly reaffirmed decision
531is not acceptable.
532
533Unacceptable behavior will result in a public and clearly identified warning.
522c63f2
RS
534Repeated unacceptable behavior will result in removal from the mailing list and
535revocation of rights to update rt.perl.org. The first removal is for one
536month. Subsequent removals will double in length. After six months with no
537warning, a user's ban length is reset. Removals, like warnings, are public.
17c80487 538
0c6082f4
RS
539The list of moderators will be public knowledge. At present, it is:
540Aaron Crane, Andy Dougherty, Ricardo Signes, Steffen Müller.
3b4ebcde 541
48cb5b3a
JV
542=head1 CREDITS
543
3b4ebcde 544"Social Contract about Contributed Modules" originally by Russ Allbery E<lt>rra@stanford.eduE<gt> and the perl5-porters.
3c78fafa 545