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