This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
release schedule: Max M. will do December 2014
[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
158very limited circumstances. If a given language feature's continued
159inclusion in the language will cause significant harm to the language
160or prevent us from making needed changes to the runtime, then it may
161be considered for deprecation.
162
163Any language change which breaks backward-compatibility should be able to
164be enabled or disabled lexically. Unless code at a given scope declares
165that it wants the new behavior, that new behavior should be disabled.
166Which backward-incompatible changes are controlled implicitly by a
167'use v5.x.y' is a decision which should be made by the pumpking in
168consultation with the community.
169
170When a backward-incompatible change can't be toggled lexically, the decision
171to change the language must be considered very, very carefully. If it's
172possible to move the old syntax or semantics out of the core language
173and into XS-land, that XS module should be enabled by default unless
174the user declares that they want a newer revision of Perl.
175
176Historically, we've held ourselves to a far higher standard than
177backward-compatibility -- bugward-compatibility. Any accident of
178implementation or unintentional side-effect of running some bit of code
179has been considered to be a feature of the language to be defended with
180the same zeal as any other feature or functionality. No matter how
181frustrating these unintentional features may be to us as we continue
182to improve Perl, these unintentional features often deserve our
183protection. It is very important that existing software written in
184Perl continue to work correctly. If end-user developers have adopted a
185bug as a feature, we need to treat it as such.
186
187New syntax and semantics which don't break existing language constructs
188and syntax have a much lower bar. They merely need to prove themselves
b6538e4f 189to be useful, elegant, well designed, and well tested.
70e4a83b
JV
190
191=head2 Terminology
192
193To make sure we're talking about the same thing when we discuss the removal
194of features or functionality from the Perl core, we have specific definitions
195for a few words and phrases.
196
197=over
198
199=item experimental
200
201If something in the Perl core is marked as B<experimental>, we may change
202its behaviour, deprecate or remove it without notice. While we'll always
203do our best to smooth the transition path for users of experimental
204features, you should contact the perl5-porters mailinglist if you find
205an experimental feature useful and want to help shape its future.
206
207=item deprecated
208
209If something in the Perl core is marked as B<deprecated>, we may remove it
5c5fd8eb
KW
210from the core in the future, though we might not. Generally, backward
211incompatible changes will have deprecation warnings for two release
212cycles before being removed, but may be removed after just one cycle if
213the risk seems quite low or the benefits quite high.
214
215As of
70e4a83b 216Perl 5.12, deprecated features and modules warn the user as they're used.
42b68fb1
DG
217When a module is deprecated, it will also be made available on CPAN.
218Installing it from CPAN will silence deprecation warnings for that module.
219
220If you use a deprecated feature or module and believe that its removal from
221the Perl core would be a mistake, please contact the perl5-porters
222mailinglist and plead your case. We don't deprecate things without a good
223reason, but sometimes there's a counterargument we haven't considered.
224Historically, we did not distinguish between "deprecated" and "discouraged"
225features.
70e4a83b
JV
226
227=item discouraged
228
229From time to time, we may mark language constructs and features which we
230consider to have been mistakes as B<discouraged>. Discouraged features
5c5fd8eb 231aren't currently candidates for removal, but
70e4a83b 232we may later deprecate them if they're found to stand in the way of a
9a7064ee 233significant improvement to the Perl core.
70e4a83b
JV
234
235=item removed
236
5c5fd8eb
KW
237Once a feature, construct or module has been marked as deprecated, we
238may remove it from the Perl core. Unsurprisingly,
42b68fb1
DG
239we say we've B<removed> these things. When a module is removed, it will
240no longer ship with Perl, but will continue to be available on CPAN.
70e4a83b
JV
241
242=back
48cb5b3a 243
fcf56c88
JV
244=head1 MAINTENANCE BRANCHES
245
246=over
247
248=item *
249
250New releases of maint should contain as few changes as possible.
251If there is any question about whether a given patch might merit
252inclusion in a maint release, then it almost certainly should not
253be included.
254
255=item *
256
257Portability fixes, such as changes to Configure and the files in
258hints/ are acceptable. Ports of Perl to a new platform, architecture
259or OS release that involve changes to the implementation are NOT
260acceptable.
261
262=item *
263
b6538e4f 264Acceptable documentation updates are those that correct factual errors,
17c80487 265explain significant bugs or deficiencies in the current implementation,
b6538e4f 266or fix broken markup.
fcf56c88
JV
267
268=item *
269
270Patches that add new warnings or errors or deprecate features
271are not acceptable.
272
273=item *
274
275Patches that fix crashing bugs that do not otherwise change Perl's
17c80487 276functionality or negatively impact performance are acceptable.
fcf56c88
JV
277
278=item *
279
280Patches that fix CVEs or security issues are acceptable, but should
281be run through the perl5-security-report@perl.org mailing list
282rather than applied directly.
283
284=item *
285
56b40e63
RS
286Patches that fix regressions in perl's behavior relative to previous
287releases are acceptable.
288
289=item *
290
17c80487 291Updates to dual-life modules should consist of minimal patches to
fcf56c88
JV
292fix crashing or security issues (as above).
293
294=item *
295
bd21af11 296Minimal patches that fix platform-specific test failures or build or
27d0393b
JV
297installation issues are acceptable. When these changes are made
298to dual-life modules for which CPAN is canonical, any changes
299should be coordinated with the upstream author.
300
301=item *
302
fcf56c88
JV
303New versions of dual-life modules should NOT be imported into maint.
304Those belong in the next stable series.
305
306=item *
307
308Patches that add or remove features are not acceptable.
309
310=item *
311
312Patches that break binary compatibility are not acceptable. (Please
313talk to a pumpking.)
314
315=back
316
317
318=head2 Getting changes into a maint branch
319
320Historically, only the pumpking cherry-picked changes from bleadperl
e566981e 321into maintperl. This has scaling problems. At the same time,
fcf56c88 322maintenance branches of stable versions of Perl need to be treated with
e566981e
DG
323great care. To that end, as of Perl 5.12, we have a new process for
324maint branches.
fcf56c88 325
e566981e 326Any committer may cherry-pick any commit from blead to a maint branch if
fcf56c88 327they send mail to perl5-porters announcing their intent to cherry-pick
17c80487 328a specific commit along with a rationale for doing so and at least two
fcf56c88
JV
329other committers respond to the list giving their assent. (This policy
330applies to current and former pumpkings, as well as other committers.)
48cb5b3a
JV
331
332=head1 CONTRIBUTED MODULES
333
334
335=head2 A Social Contract about Artistic Control
6ee623d5
GS
336
337What follows is a statement about artistic control, defined as the ability
338of authors of packages to guide the future of their code and maintain
339control over their work. It is a recognition that authors should have
340control over their work, and that it is a responsibility of the rest of
341the Perl community to ensure that they retain this control. It is an
342attempt to document the standards to which we, as Perl developers, intend
343to hold ourselves. It is an attempt to write down rough guidelines about
344the respect we owe each other as Perl developers.
345
346This statement is not a legal contract. This statement is not a legal
347document in any way, shape, or form. Perl is distributed under the GNU
348Public License and under the Artistic License; those are the precise legal
349terms. This statement isn't about the law or licenses. It's about
350community, mutual respect, trust, and good-faith cooperation.
351
352We recognize that the Perl core, defined as the software distributed with
353the heart of Perl itself, is a joint project on the part of all of us.
aaa2bbb1 354From time to time, a script, module, or set of modules (hereafter referred
6ee623d5
GS
355to simply as a "module") will prove so widely useful and/or so integral to
356the correct functioning of Perl itself that it should be distributed with
9a7064ee 357the Perl core. This should never be done without the author's explicit
6ee623d5
GS
358consent, and a clear recognition on all parts that this means the module
359is being distributed under the same terms as Perl itself. A module author
360should realize that inclusion of a module into the Perl core will
361necessarily mean some loss of control over it, since changes may
362occasionally have to be made on short notice or for consistency with the
363rest of Perl.
364
365Once a module has been included in the Perl core, however, everyone
366involved in maintaining Perl should be aware that the module is still the
367property of the original author unless the original author explicitly
368gives up their ownership of it. In particular:
369
48cb5b3a
JV
370=over
371
171407a0
JJ
372=item *
373
9a7064ee 374The version of the module in the Perl core should still be considered the
171407a0
JJ
375work of the original author. All patches, bug reports, and so
376forth should be fed back to them. Their development directions
377should be respected whenever possible.
6ee623d5 378
48cb5b3a
JV
379=item *
380
381Patches may be applied by the pumpkin holder without the explicit
382cooperation of the module author if and only if they are very minor,
383time-critical in some fashion (such as urgent security fixes), or if
384the module author cannot be reached. Those patches must still be
385given back to the author when possible, and if the author decides on
386an alternate fix in their version, that fix should be strongly
387preferred unless there is a serious problem with it. Any changes not
388endorsed by the author should be marked as such, and the contributor
389of the change acknowledged.
390
391=item *
392
393The version of the module distributed with Perl should, whenever
394possible, be the latest version of the module as distributed by the
395author (the latest non-beta version in the case of public Perl
396releases), although the pumpkin holder may hold off on upgrading the
397version of the module distributed with Perl to the latest version
398until the latest version has had sufficient testing.
399
400=back
6ee623d5
GS
401
402In other words, the author of a module should be considered to have final
403say on modifications to their module whenever possible (bearing in mind
404that it's expected that everyone involved will work together and arrive at
405reasonable compromises when there are disagreements).
406
407As a last resort, however:
408
48cb5b3a
JV
409
410If the author's vision of the future of their module is sufficiently
411different from the vision of the pumpkin holder and perl5-porters as a
412whole so as to cause serious problems for Perl, the pumpkin holder may
9a7064ee 413choose to formally fork the version of the module in the Perl core from the
48cb5b3a 414one maintained by the author. This should not be done lightly and
c4f5d98d 415should B<always> if at all possible be done only after direct input
48cb5b3a 416from Larry. If this is done, it must then be made explicit in the
9a7064ee 417module as distributed with the Perl core that it is a forked version and
48cb5b3a
JV
418that while it is based on the original author's work, it is no longer
419maintained by them. This must be noted in both the documentation and
420in the comments in the source of the module.
6ee623d5
GS
421
422Again, this should be a last resort only. Ideally, this should never
423happen, and every possible effort at cooperation and compromise should be
424made before doing this. If it does prove necessary to fork a module for
425the overall health of Perl, proper credit must be given to the original
426author in perpetuity and the decision should be constantly re-evaluated to
427see if a remerging of the two branches is possible down the road.
428
429In all dealings with contributed modules, everyone maintaining Perl should
430keep in mind that the code belongs to the original author, that they may
431not be on perl5-porters at any given time, and that a patch is not
432official unless it has been integrated into the author's copy of the
433module. To aid with this, and with points #1, #2, and #3 above, contact
434information for the authors of all contributed modules should be kept with
435the Perl distribution.
436
437Finally, the Perl community as a whole recognizes that respect for
438ownership of code, respect for artistic control, proper credit, and active
439effort to prevent unintentional code skew or communication gaps is vital
440to the health of the community and Perl itself. Members of a community
441should not normally have to resort to rules and laws to deal with each
442other, and this document, although it contains rules so as to be clear, is
443about an attitude and general approach. The first step in any dispute
444should be open communication, respect for opposing views, and an attempt
445at a compromise. In nearly every circumstance nothing more will be
446necessary, and certainly no more drastic measure should be used until
447every avenue of communication and discussion has failed.
3c78fafa 448
70e4a83b 449
3b4ebcde
JV
450=head1 DOCUMENTATION
451
452Perl's documentation is an important resource for our users. It's
453incredibly important for Perl's documentation to be reasonably coherent
454and to accurately reflect the current implementation.
455
456Just as P5P collectively maintains the codebase, we collectively
457maintain the documentation. Writing a particular bit of documentation
458doesn't give an author control of the future of that documentation.
459At the same time, just as source code changes should match the style
460of their surrounding blocks, so should documentation changes.
461
462Examples in documentation should be illustrative of the concept
463they're explaining. Sometimes, the best way to show how a
464language feature works is with a small program the reader can
465run without modification. More often, examples will consist
466of a snippet of code containing only the "important" bits.
467The definition of "important" varies from snippet to snippet.
1bb8a155 468Sometimes it's important to declare C<use strict> and C<use warnings>,
3b4ebcde
JV
469initialize all variables and fully catch every error condition.
470More often than not, though, those things obscure the lesson
471the example was intended to teach.
472
473As Perl is developed by a global team of volunteers, our
474documentation often contains spellings which look funny
475to I<somebody>. Choice of American/British/Other spellings
476is left as an exercise for the author of each bit of
477documentation. When patching documentation, try to emulate
478the documentation around you, rather than changing the existing
479prose.
480
481In general, documentation should describe what Perl does "now" rather
482than what it used to do. It's perfectly reasonable to include notes
483in documentation about how behaviour has changed from previous releases,
9e9fdd5d 484but, with very few exceptions, documentation isn't "dual-life" --
3b4ebcde
JV
485it doesn't need to fully describe how all old versions used to work.
486
17c80487
RS
487=head1 STANDARDS OF CONDUCT
488
489The official forum for the development of perl is the perl5-porters mailing
490list, mentioned above, and its bugtracker at rt.perl.org. All participants in
491discussion there are expected to adhere to a standard of conduct.
492
493=over 4
494
495=item *
496
497Always be civil.
498
499=item *
500
501Heed the moderators.
502
503=back
504
505Civility is simple: stick to the facts while avoiding demeaning remarks and
506sarcasm. It is not enough to be factual. You must also be civil. Responding
507in kind to incivility is not acceptable.
508
509If the list moderators tell you that you are not being civil, carefully
510consider how your words have appeared before responding in any way. You may
511protest, but repeated protest in the face of a repeatedly reaffirmed decision
512is not acceptable.
513
514Unacceptable behavior will result in a public and clearly identified warning.
515Repeated unacceptable behavior will result in removal from the mailing list.
516The first removal is for one month. Subsequent removals will double in length.
517After six months with no warning, a user's ban length is reset. Removals, like
518warnings, are public.
519
0c6082f4
RS
520The list of moderators will be public knowledge. At present, it is:
521Aaron Crane, Andy Dougherty, Ricardo Signes, Steffen Müller.
3b4ebcde 522
48cb5b3a
JV
523=head1 CREDITS
524
3b4ebcde 525"Social Contract about Contributed Modules" originally by Russ Allbery E<lt>rra@stanford.eduE<gt> and the perl5-porters.
3c78fafa 526