This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change enum names for new locale function parameters
[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.20.x
88 and earlier are now out of support.  As of the release of 5.26.0, we will
89 "officially" end support for Perl 5.22.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. See L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
124 for details on how 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 are believed to be very rarely used,
159 stand in the way of actual improvement to the Perl language or perl
160 interpreter, and if affected code can be easily updated to continue
161 working, they may be considered for removal.  When in doubt, caution
162 dictates that we will favor backward compatibility.  When a feature is
163 deprecated, a statement of reasoning describing the decision process
164 will be posted, and a link to it will be provided in the relevant
165 perldelta documents.
166
167 Using a lexical pragma to enable or disable legacy behavior should be
168 considered when appropriate, and in the absence of any pragma legacy
169 behavior should be enabled.  Which backward-incompatible changes are
170 controlled implicitly by a 'use v5.x.y' is a decision which should be
171 made by the pumpking in consultation with the community.
172
173 Historically, we've held ourselves to a far higher standard than
174 backward-compatibility -- bugward-compatibility.  Any accident of
175 implementation or unintentional side-effect of running some bit of code
176 has been considered to be a feature of the language to be defended with
177 the same zeal as any other feature or functionality.  No matter how
178 frustrating these unintentional features may be to us as we continue
179 to improve Perl, these unintentional features often deserve our
180 protection.  It is very important that existing software written in
181 Perl continue to work correctly.  If end-user developers have adopted a
182 bug as a feature, we need to treat it as such.
183
184 New syntax and semantics which don't break existing language constructs
185 and syntax have a much lower bar.  They merely need to prove themselves
186 to be useful, elegant, well designed, and well tested.  In most cases,
187 these additions will be marked as I<experimental> for some time.  See
188 below for more on that.
189
190 =head2 Terminology
191
192 To make sure we're talking about the same thing when we discuss the removal
193 of features or functionality from the Perl core, we have specific definitions
194 for a few words and phrases.
195
196 =over
197
198 =item experimental
199
200 If something in the Perl core is marked as B<experimental>, we may change
201 its behaviour, deprecate or remove it without notice. While we'll always
202 do our best to smooth the transition path for users of experimental
203 features, you should contact the perl5-porters mailinglist if you find
204 an experimental feature useful and want to help shape its future.
205
206 Experimental features must be experimental in two stable releases before being
207 marked non-experimental.  Experimental features will only have their
208 experimental status revoked when they no longer have any design-changing bugs
209 open against them and when they have remained unchanged in behavior for the
210 entire length of a development cycle.  In other words, a feature present in
211 v5.20.0 may be marked no longer experimental in v5.22.0 if and only if its
212 behavior is unchanged throughout all of v5.21.
213
214 =item deprecated
215
216 If something in the Perl core is marked as B<deprecated>, we may remove it
217 from the core in the future, though we might not.  Generally, backward
218 incompatible changes will have deprecation warnings for two release
219 cycles before being removed, but may be removed after just one cycle if
220 the risk seems quite low or the benefits quite high.
221
222 As of
223 Perl 5.12, deprecated features and modules warn the user as they're used.
224 When a module is deprecated, it will also be made available on CPAN.
225 Installing it from CPAN will silence deprecation warnings for that module.
226
227 If you use a deprecated feature or module and believe that its removal from
228 the Perl core would be a mistake, please contact the perl5-porters
229 mailinglist and plead your case.  We don't deprecate things without a good
230 reason, but sometimes there's a counterargument we haven't considered.
231 Historically, we did not distinguish between "deprecated" and "discouraged"
232 features.
233
234 =item discouraged
235
236 From time to time, we may mark language constructs and features which we
237 consider to have been mistakes as B<discouraged>.  Discouraged features
238 aren't currently candidates for removal, but
239 we may later deprecate them if they're found to stand in the way of a
240 significant improvement to the Perl core.
241
242 =item removed
243
244 Once a feature, construct or module has been marked as deprecated, we
245 may remove it from the Perl core.  Unsurprisingly,
246 we say we've B<removed> these things.  When a module is removed, it will
247 no longer ship with Perl, but will continue to be available on CPAN.
248
249 =back
250
251 =head1 MAINTENANCE BRANCHES
252
253 New releases of maintenance branches should only contain changes that fall into
254 one of the "acceptable" categories set out below, but must not contain any
255 changes that fall into one of the "unacceptable" categories.  (For example, a
256 fix for a crashing bug must not be included if it breaks binary compatibility.)
257
258 It is not necessary to include every change meeting these criteria, and in
259 general the focus should be on addressing security issues, crashing bugs,
260 regressions and serious installation issues.  The temptation to include a
261 plethora of minor changes that don't affect the installation or execution of
262 perl (e.g. spelling corrections in documentation) should be resisted in order
263 to reduce the overall risk of overlooking something.  The intention is to
264 create maintenance releases which are both worthwhile and which users can have
265 full confidence in the stability of.  (A secondary concern is to avoid burning
266 out the maint-pumpking or overwhelming other committers voting on changes to be
267 included (see L</"Getting changes into a maint branch"> below).)
268
269 The following types of change may be considered acceptable, as long as they do
270 not also fall into any of the "unacceptable" categories set out below:
271
272 =over
273
274 =item *
275
276 Patches that fix CVEs or security issues.  These changes should
277 be passed using the security reporting mechanism rather than applied
278 directly; see L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>.
279
280 =item *
281
282 Patches that fix crashing bugs, assertion failures and
283 memory corruption but which do not otherwise change perl's
284 functionality or negatively impact performance.
285
286 =item *
287
288 Patches that fix regressions in perl's behavior relative to previous
289 releases, no matter how old the regression, since some people may
290 upgrade from very old versions of perl to the latest version.
291
292 =item *
293
294 Patches that fix bugs in features that were new in the corresponding 5.x.0
295 stable release.
296
297 =item *
298
299 Patches that fix anything which prevents or seriously impacts the build
300 or installation of perl.
301
302 =item *
303
304 Portability fixes, such as changes to Configure and the files in
305 the hints/ folder.
306
307 =item *
308
309 Minimal patches that fix platform-specific test failures.
310
311 =item *
312
313 Documentation updates that correct factual errors, explain significant
314 bugs or deficiencies in the current implementation, or fix broken markup.
315
316 =item *
317
318 Updates to dual-life modules should consist of minimal patches to
319 fix crashing bugs or security issues (as above).  Any changes made to
320 dual-life modules for which CPAN is canonical should be coordinated with
321 the upstream author.
322
323 =back
324
325 The following types of change are NOT acceptable:
326
327 =over
328
329 =item *
330
331 Patches that break binary compatibility.  (Please talk to a pumpking.)
332
333 =item *
334
335 Patches that add or remove features.
336
337 =item *
338
339 Patches that add new warnings or errors or deprecate features.
340
341 =item *
342
343 Ports of Perl to a new platform, architecture or OS release that
344 involve changes to the implementation.
345
346 =item *
347
348 New versions of dual-life modules should NOT be imported into maint.
349 Those belong in the next stable series.
350
351 =back
352
353 If there is any question about whether a given patch might merit
354 inclusion in a maint release, then it almost certainly should not
355 be included.
356
357 =head2 Getting changes into a maint branch
358
359 Historically, only the pumpking cherry-picked changes from bleadperl
360 into maintperl.  This has scaling problems.  At the same time,
361 maintenance branches of stable versions of Perl need to be treated with
362 great care.  To that end, as of Perl 5.12, we have a new process for
363 maint branches.
364
365 Any committer may cherry-pick any commit from blead to a maint branch by
366 first adding an entry to the relevant voting file in the maint-votes branch
367 announcing the commit as a candidate for back-porting, and then waiting for
368 at least two other committers to add their votes in support of this (i.e. a
369 total of at least three votes is required before a commit may be back-ported).
370
371 Most of the work involved in both rounding up a suitable set of candidate
372 commits and cherry-picking those for which three votes have been cast will
373 be done by the maint branch release manager, but anyone else is free to add
374 other proposals if they're keen to ensure certain fixes don't get overlooked
375 or fear they already have been.
376
377 Other voting mechanisms may also be used instead (e.g. sending mail to
378 perl5-porters and at least two other committers responding to the list
379 giving their assent), as long as the same number of votes is gathered in a
380 transparent manner.  Specifically, proposals of which changes to cherry-pick
381 must be visible to everyone on perl5-porters so that the views of everyone
382 interested may be heard.
383
384 It is not necessary for voting to be held on cherry-picking perldelta
385 entries associated with changes that have already been cherry-picked, nor
386 for the maint-pumpking to obtain votes on changes required by the
387 F<Porting/release_managers_guide.pod> where such changes can be applied by
388 the means of cherry-picking from blead.
389
390 =head1 CONTRIBUTED MODULES
391
392
393 =head2 A Social Contract about Artistic Control
394
395 What follows is a statement about artistic control, defined as the ability
396 of authors of packages to guide the future of their code and maintain
397 control over their work.  It is a recognition that authors should have
398 control over their work, and that it is a responsibility of the rest of
399 the Perl community to ensure that they retain this control.  It is an
400 attempt to document the standards to which we, as Perl developers, intend
401 to hold ourselves.  It is an attempt to write down rough guidelines about
402 the respect we owe each other as Perl developers.
403
404 This statement is not a legal contract.  This statement is not a legal
405 document in any way, shape, or form.  Perl is distributed under the GNU
406 Public License and under the Artistic License; those are the precise legal
407 terms.  This statement isn't about the law or licenses.  It's about
408 community, mutual respect, trust, and good-faith cooperation.
409
410 We recognize that the Perl core, defined as the software distributed with
411 the heart of Perl itself, is a joint project on the part of all of us.
412 From time to time, a script, module, or set of modules (hereafter referred
413 to simply as a "module") will prove so widely useful and/or so integral to
414 the correct functioning of Perl itself that it should be distributed with
415 the Perl core.  This should never be done without the author's explicit
416 consent, and a clear recognition on all parts that this means the module
417 is being distributed under the same terms as Perl itself.  A module author
418 should realize that inclusion of a module into the Perl core will
419 necessarily mean some loss of control over it, since changes may
420 occasionally have to be made on short notice or for consistency with the
421 rest of Perl.
422
423 Once a module has been included in the Perl core, however, everyone
424 involved in maintaining Perl should be aware that the module is still the
425 property of the original author unless the original author explicitly
426 gives up their ownership of it.  In particular:
427
428 =over
429
430 =item *
431
432 The version of the module in the Perl core should still be considered the
433 work of the original author.  All patches, bug reports, and so
434 forth should be fed back to them.  Their development directions
435 should be respected whenever possible.
436
437 =item *
438
439 Patches may be applied by the pumpkin holder without the explicit
440 cooperation of the module author if and only if they are very minor,
441 time-critical in some fashion (such as urgent security fixes), or if
442 the module author cannot be reached.  Those patches must still be
443 given back to the author when possible, and if the author decides on
444 an alternate fix in their version, that fix should be strongly
445 preferred unless there is a serious problem with it.  Any changes not
446 endorsed by the author should be marked as such, and the contributor
447 of the change acknowledged.
448
449 =item *
450
451 The version of the module distributed with Perl should, whenever
452 possible, be the latest version of the module as distributed by the
453 author (the latest non-beta version in the case of public Perl
454 releases), although the pumpkin holder may hold off on upgrading the
455 version of the module distributed with Perl to the latest version
456 until the latest version has had sufficient testing.
457
458 =back
459
460 In other words, the author of a module should be considered to have final
461 say on modifications to their module whenever possible (bearing in mind
462 that it's expected that everyone involved will work together and arrive at
463 reasonable compromises when there are disagreements).
464
465 As a last resort, however:
466
467
468 If the author's vision of the future of their module is sufficiently
469 different from the vision of the pumpkin holder and perl5-porters as a
470 whole so as to cause serious problems for Perl, the pumpkin holder may
471 choose to formally fork the version of the module in the Perl core from the
472 one maintained by the author.  This should not be done lightly and
473 should B<always> if at all possible be done only after direct input
474 from Larry.  If this is done, it must then be made explicit in the
475 module as distributed with the Perl core that it is a forked version and
476 that while it is based on the original author's work, it is no longer
477 maintained by them.  This must be noted in both the documentation and
478 in the comments in the source of the module.
479
480 Again, this should be a last resort only.  Ideally, this should never
481 happen, and every possible effort at cooperation and compromise should be
482 made before doing this.  If it does prove necessary to fork a module for
483 the overall health of Perl, proper credit must be given to the original
484 author in perpetuity and the decision should be constantly re-evaluated to
485 see if a remerging of the two branches is possible down the road.
486
487 In all dealings with contributed modules, everyone maintaining Perl should
488 keep in mind that the code belongs to the original author, that they may
489 not be on perl5-porters at any given time, and that a patch is not
490 official unless it has been integrated into the author's copy of the
491 module.  To aid with this, and with points #1, #2, and #3 above, contact
492 information for the authors of all contributed modules should be kept with
493 the Perl distribution.
494
495 Finally, the Perl community as a whole recognizes that respect for
496 ownership of code, respect for artistic control, proper credit, and active
497 effort to prevent unintentional code skew or communication gaps is vital
498 to the health of the community and Perl itself.  Members of a community
499 should not normally have to resort to rules and laws to deal with each
500 other, and this document, although it contains rules so as to be clear, is
501 about an attitude and general approach.  The first step in any dispute
502 should be open communication, respect for opposing views, and an attempt
503 at a compromise.  In nearly every circumstance nothing more will be
504 necessary, and certainly no more drastic measure should be used until
505 every avenue of communication and discussion has failed.
506
507
508 =head1 DOCUMENTATION
509
510 Perl's documentation is an important resource for our users. It's
511 incredibly important for Perl's documentation to be reasonably coherent
512 and to accurately reflect the current implementation.
513
514 Just as P5P collectively maintains the codebase, we collectively
515 maintain the documentation.  Writing a particular bit of documentation
516 doesn't give an author control of the future of that documentation.
517 At the same time, just as source code changes should match the style
518 of their surrounding blocks, so should documentation changes.
519
520 Examples in documentation should be illustrative of the concept
521 they're explaining.  Sometimes, the best way to show how a
522 language feature works is with a small program the reader can
523 run without modification.  More often, examples will consist
524 of a snippet of code containing only the "important" bits.
525 The definition of "important" varies from snippet to snippet.
526 Sometimes it's important to declare C<use strict> and C<use warnings>,
527 initialize all variables and fully catch every error condition.
528 More often than not, though, those things obscure the lesson
529 the example was intended to teach.
530
531 As Perl is developed by a global team of volunteers, our
532 documentation often contains spellings which look funny
533 to I<somebody>.  Choice of American/British/Other spellings
534 is left as an exercise for the author of each bit of
535 documentation.  When patching documentation, try to emulate
536 the documentation around you, rather than changing the existing
537 prose.
538
539 In general, documentation should describe what Perl does "now" rather
540 than what it used to do.  It's perfectly reasonable to include notes
541 in documentation about how behaviour has changed from previous releases,
542 but, with very few exceptions, documentation isn't "dual-life" --
543 it doesn't need to fully describe how all old versions used to work.
544
545 =head1 STANDARDS OF CONDUCT
546
547 The official forum for the development of perl is the perl5-porters mailing
548 list, mentioned above, and its bugtracker at rt.perl.org.  Posting to the
549 list and the bugtracker is not a right: all participants in discussion are
550 expected to adhere to a standard of conduct.
551
552 =over 4
553
554 =item *
555
556 Always be civil.
557
558 =item *
559
560 Heed the moderators.
561
562 =back
563
564 Civility is simple: stick to the facts while avoiding demeaning remarks,
565 belittling other individuals, sarcasm, or a presumption of bad faith. It is
566 not enough to be factual.  You must also be civil.  Responding in kind to
567 incivility is not acceptable.  If you relay otherwise-unposted comments to
568 the list from a third party, you take responsibility for the content of
569 those comments, and you must therefore ensure that they are civil.
570
571 While civility is required, kindness is encouraged; if you have any doubt about
572 whether you are being civil, simply ask yourself, "Am I being kind?" and aspire
573 to that.
574
575 If the list moderators tell you that you are not being civil, carefully
576 consider how your words have appeared before responding in any way.  Were they
577 kind?  You may protest, but repeated protest in the face of a repeatedly
578 reaffirmed decision is not acceptable.  Repeatedly protesting about the
579 moderators' decisions regarding a third party is also unacceptable, as is
580 continuing to initiate off-list contact with the moderators about their
581 decisions.
582
583 Unacceptable behavior will result in a public and clearly identified
584 warning.  A second instance of unacceptable behavior from the same
585 individual will result in removal from the mailing list and rt.perl.org,
586 for a period of one calendar month.  The rationale for this is to
587 provide an opportunity for the person to change the way they act.
588
589 After the time-limited ban has been lifted, a third instance of
590 unacceptable behavior will result in a further public warning.  A fourth
591 or subsequent instance will result in an indefinite ban.  The rationale
592 is that, in the face of an apparent refusal to change behavior, we must
593 protect other community members from future unacceptable actions.  The
594 moderators may choose to lift an indefinite ban if the person in
595 question affirms they will not transgress again.
596
597 Removals, like warnings, are public.
598
599 The list of moderators will be public knowledge.  At present, it is:
600 Aaron Crane, Andy Dougherty, Karen Etheridge, Ricardo Signes, Sawyer X,
601 Steffen Müller, Todd Rinaldo.
602
603 =head1 CREDITS
604
605 "Social Contract about Contributed Modules" originally by Russ Allbery E<lt>rra@stanford.eduE<gt> and the perl5-porters.
606