This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix typos
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perldelta - what is new for perl v5.21.9
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.21.8 release and the 5.21.9
10 release.
11
12 If you are upgrading from an earlier release such as 5.21.7, first read
13 L<perl5218delta>, which describes differences between 5.21.7 and 5.21.8.
14
15 =head1 Notice
16
17 With this release we are now in the user-visible changes portion of the code
18 freeze as we prepare for the next stable release of Perl 5.
19
20 =head1 Core Enhancements
21
22 =head2 qr/\b{gcb}/ is now handled in regular expressions
23
24 C<gcb> stands for Grapheme Cluster Boundary.  It is a Unicode property
25 that finds the boundary between sequences of characters that look like a
26 single character to a native speaker of a language.  Perl has long had
27 the ability to deal with these through the C<\X> regular escape
28 sequence.  Now, there is an alternative way of handling these.  See
29 L<perlrebackslash/\b{}, \b, \B{}, \B> for details.
30
31 =head2 qr/\b{wb}/ is now handled in regular expressions
32
33 C<wb> stands for Word Boundary.  It is a Unicode property
34 that finds the boundary between words.  This is similar to the plain
35 C<\b> (without braces) but is more suitable for natural language
36 processing.  It knows, for example that apostrophes can occur in the
37 middle of words.  See L<perlrebackslash/\b{}, \b, \B{}, \B> for details.
38
39 =head2 qr/\b{sb}/ is now handled in regular expressions
40
41 C<sb> stands for Sentence Boundary.  It is a Unicode property
42 to aid in parsing natural language sentences.
43 See L<perlrebackslash/\b{}, \b, \B{}, \B> for details.
44
45 =head2 New bitwise operators
46
47 A new experimental facility has been added that makes the four standard
48 bitwise operators (C<& | ^ ~>) treat their operands consistently as
49 numbers, and introduces four new dotted operators (C<&. |. ^. ~.>) that
50 treat their operands consistently as strings.  The same applies to the
51 assignment variants (C<&= |= ^= &.= |.= ^.=>).
52
53 To use this, enable the "bitwise" feature and disable the
54 "experimental::bitwise" warnings category.  See L<perlop/Bitwise String
55 Operators> for details.  [rt.perl.org #123466]
56
57 =head2 C<no re> covers more and is lexical
58
59 Previously running C<no re> would only turn off a few things. Now it
60 turns off all the enabled things. For example, previously, you
61 couldn't turn off debugging, once enabled, inside the same block.
62
63 =head1 Incompatible Changes
64
65 There are no changes intentionally incompatible with 5.21.8.
66 If any exist, they are bugs, and we request that you submit a
67 report.  See L</Reporting Bugs> below.
68
69 =head1 Performance Enhancements
70
71 =over 4
72
73 =item *
74
75 XXX
76
77 =back
78
79 =head1 Modules and Pragmata
80
81 =head2 Updated Modules and Pragmata
82
83 =over 4
84
85 =item *
86
87 L<attributes> has been upgraded from version 0.25 to 0.26.
88
89 =item *
90
91 L<B> has been upgraded from version 1.55 to 1.56.
92
93 =item *
94
95 L<B::Debug> has been upgraded from version 1.22 to 1.23.
96
97 =item *
98
99 L<B::Deparse> has been upgraded from version 1.32 to 1.33.
100
101 =over 4
102
103 =item *
104
105 Deparse now provides a defined state sub in inner subs.
106
107 =item *
108
109 Since version Perl 5.21.6, Deparse would croak on special constants, but
110 this has now been fixed.
111
112 =back
113
114 =item *
115
116 L<Benchmark> has been upgraded from version 1.19 to 1.20.
117
118 =item *
119
120 L<bigint>, L<bignum>, L<bigrat> have been upgraded to version 0.39.
121
122 Document in CAVEATS that using strings as numbers won't always invoke
123 the big number overloading, and how to invoke it.  [rt.perl.org #123064]
124
125 =item *
126
127 L<Carp> has been upgraded from version 1.34 to 1.35.
128
129 =over 4
130
131 =item *
132
133 Carp now handles non-ASCII platforms better.
134
135 =item *
136
137 Off-by-one error fix for Perl < 5.14.
138
139 =back
140
141 =item *
142
143 L<Config::Perl::V> has been upgraded from version 0.22 to 0.23.
144
145 =item *
146
147 L<CPAN::Meta::Requirements> has been upgraded from version 2.131 to 2.132
148
149 =item *
150
151 L<Devel::Peek> has been upgraded from version 1.21 to 1.22.
152
153 =item *
154
155 L<Encode> has been upgraded from version 2.67 to 2.70.
156
157 Building in C++ mode on Windows now works.
158
159 =item *
160
161 L<Errno> has been upgraded from version 1.22 to 1.23.
162
163 Add C<-P> to the preprocessor command-line on GCC 5.  GCC added extra
164 line directives, breaking parsing of error code definitions.  [rt.perl.org
165 #123784]
166
167 =item *
168
169 L<HTTP::Tiny> has been upgraded from version 0.053 to 0.054.
170
171 =item *
172
173 L<Opcode> has been upgraded from version 1.31 to 1.32.
174
175 =item *
176
177 L<Perl::OSType> has been upgraded from version 1.007 to 1.008.
178
179 =item *
180
181 L<PerlIO::scalar> has been upgraded from version 0.21 to 0.22.
182
183 Attempting to write at file positions impossible for the platform now
184 fail early rather than wrapping at 4GB.
185
186 =item *
187
188 L<Pod::Parser> has been upgraded from version 1.62 to 1.63.
189
190 =item *
191
192 L<Pod::Perldoc> has been upgraded from version 3.24 to 3.25.
193
194 =item *
195
196 L<POSIX> has been upgraded from version 1.49 to 1.51.
197
198 =item *
199
200 L<re> has been upgraded from version 0.30 to 0.31.
201
202 =item *
203
204 L<Socket> has been upgraded from version 2.016 to 2.018.
205
206 =item *
207
208 L<Test::Simple> has been upgraded from version 1.301001_097 to 1.301001_098.
209
210 =item *
211
212 L<Unicode::Collate> has been upgraded from version 1.10 to 1.11.
213
214 =item *
215
216 L<Unicode::UCD> has been upgraded from version 0.60 to 0.61.
217
218 =over 4
219
220 =item *
221
222 A new function L<property_values()|Unicode::UCD/prop_values()>
223 has been added to return a given property's possible values.
224
225 =item *
226
227 A new function L<charprop()|Unicode::UCD/charprop()>
228 has been added to return the value of a given property for a given code
229 point.
230
231 =item *
232
233 A new function L<charprops_all()|Unicode::UCD/charprops_all()>
234 has been added to return the values of all Unicode properties for a
235 given code point.
236
237 =item *
238
239 A bug has been fixed so that L<propaliases()|Unicode::UCD/prop_aliases()>
240 returns the correct short and long names for the Perl extensions where
241 it was incorrect.
242
243 =item *
244
245 A bug has been fixed so that
246 L<prop_value_aliases()|Unicode::UCD/prop_value_aliases()>
247 returns C<undef> instead of a wrong result for properties that are Perl
248 extensions.
249
250 =item *
251
252 This module now works on EBCDIC platforms.
253
254 =back
255
256 =item *
257
258 L<VMS::Stdio> has been upgraded from version 2.4 to 2.41.
259
260 =item *
261
262 L<Win32> has been upgraded from version 0.49 to 0.51.
263
264 GetOSName() now supports Windows 8.1, and building in C++ mode now works.
265
266 =item *
267
268 L<Win32API::File> has been upgraded from version 0.1201 to 0.1202
269
270 Building in C++ mode now works.
271
272 =back
273
274 =head1 Documentation
275
276 =head2 New Documentation
277
278 =head3 L<perlrebackslash>
279
280 =over 4
281
282 =item *
283
284 Added documentation of C<\b{sb}>, C<\b{wb}>, C<\b{gcb}>, and C<\b{g}>.
285
286 =back
287
288 =head3 L<perlrequick>
289
290 =over 4
291
292 =item *
293
294 Added example for C<\b{wb}>.
295
296 =back
297
298 =head3 L<perlretut>
299
300 =over 4
301
302 =item *
303
304 Added example for C<\b{wb}>.
305
306 =back
307
308 =head2 Changes to Existing Documentation
309
310 =head3 L<perlunicode>
311
312 =over 4
313
314 =item *
315
316 Update B<Default Word Boundaries> under
317 L<perlunicode/"Unicode Regular Expression Support Level">'s
318 B<Extended Unicode Support>.
319
320 =back
321
322 =head3 L<perlunicook>
323
324 =over 4
325
326 =item *
327
328 Clarify that autodie >= 2.26 works with C<use open>.
329
330 =item *
331
332 Correct warning message for C<use autodie> and C<use open>.
333
334 =back
335
336 =head3 L<perlfaq>
337
338 =over 4
339
340 =item *
341
342 L<perlfaq> has been synchronized with version 5.021009 from CPAN.
343
344 =back
345
346 =head3 L<perlop>
347
348 =over 4
349
350 =item *
351
352 Correct the version number which removes C<m?PATTERN?>. It was Perl 5.22.0.
353
354 =back
355
356 =head3 L<perlvar>
357
358 =over 4
359
360 =item *
361
362 Further clarify version number representations and usage.
363
364 =back
365
366 =head3 L<perlmodstyle>
367
368 =over 4
369
370 =item *
371
372 Instead of pointing to the module list, we are now pointing to PrePAN.
373
374 =back
375
376 =head1 Diagnostics
377
378 The following additions or changes have been made to diagnostic output,
379 including warnings and fatal error messages.  For the complete list of
380 diagnostic messages, see L<perldiag>.
381
382 =head2 New Diagnostics
383
384 =head3 New Warnings
385
386 =over 4
387
388 =item *
389
390 L<'%s' is an unknown bound type in regex|perldiag/"'%s' is an unknown bound type in regex; marked by <-- HERE in m/%s/">
391
392 You used C<\b{...}> or C<\B{...}> and the C<...> is not known to
393 Perl.  The current valid ones are given in
394 L<perlrebackslash/\b{}, \b, \B{}, \B>.
395
396 =item *
397
398 L<Use of \b{} for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale|perldiag/"Use of \b{} for non-UTF-8 locale is wrong.  Assuming a UTF-8 locale">
399
400 You are matching a regular expression using locale rules,
401 and a Unicode boundary is being matched, but the locale is not a Unicode
402 one.  This doesn't make sense.  Perl will continue, assuming a Unicode
403 (UTF-8) locale, but the results could well be wrong except if the locale
404 happens to be ISO-8859-1 (Latin1) where this message is spurious and can
405 be ignored.
406
407 =item *
408
409 L<< Using E<sol>u for '%s' instead of E<sol>%s in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Using E<sol>u for '%s' instead of E<sol>%s in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>
410
411 You used a Unicode boundary (C<\b{...}> or C<\B{...}>) in a
412 portion of a regular expression where the character set modifiers C</a>
413 or C</aa> are in effect.  These two modifiers indicate an ASCII
414 interpretation, and this doesn't make sense for a Unicode definition.
415 The generated regular expression will compile so that the boundary uses
416 all of Unicode.  No other portion of the regular expression is affected.
417
418 =item *
419
420 L<The bitwise feature is experimental|perldiag/"The bitwise feature is experimental">
421
422 This warning is emitted if you use bitwise
423 operators (C<& | ^ ~ &. |. ^. ~.>) with the "bitwise" feature enabled.
424 Simply suppress the warning if you want to use the feature, but know
425 that in doing so you are taking the risk of using an experimental
426 feature which may change or be removed in a future Perl version:
427
428     no warnings "experimental::bitwise";
429     use feature "bitwise";
430     $x |.= $y;
431
432 =back
433
434 =head2 Changes to Existing Diagnostics
435
436 =over 4
437
438 =item *
439
440 B<Unusual use of %s in void context> has been removed. It might
441 come back in a future release.
442
443 =item *
444
445 L<Argument "%s" isn't numeric%s|perldiag/"Argument "%s" isn't numeric%s">
446 now adds the following note:
447
448     Note that for the C<Inf> and C<NaN> (infinity and not-a-number) the
449     definition of "numeric" is somewhat unusual: the strings themselves
450     (like "Inf") are considered numeric, and anything following them is
451     considered non-numeric.
452
453 =item *
454
455 B<Possible precedence problem on bitwise %c operator> reworded as
456 L<Possible precedence problem on bitwise %s operator|perldiag/"Possible precedence problem on bitwise %s operator">.
457
458 =back
459
460 =head1 Utility Changes
461
462 =head2 L<h2ph>
463
464 =over 4
465
466 =item *
467
468 F<h2ph> now handles hexadecimal constants in the compiler's predefined
469 macro definitions, as visible in C<$Config{cppsymbols}>.  [rt.perl.org
470 #123784]
471
472 =back
473
474 =head2 L<encguess>
475
476 =over 4
477
478 =item *
479
480 No longer depends on non-core module anymore.
481
482 =back
483
484 =head1 Configuration and Compilation
485
486 =over 4
487
488 =item *
489
490 F<Configure> now checks for F<lrintl>, F<lroundl>, F<llrintl>, and F<llroundl>.
491
492 =back
493
494 =head1 Testing
495
496 =over 4
497
498 =item *
499
500 Added F<t/op/dump.t> for testing C<dump>.
501
502 =back
503
504 =head1 Deprecations
505
506 =head2 Support for new warnings categories outside of "all"
507
508 The new option for warnings outside the B<all> category in the L<warnings>
509 pragma has been removed for now.
510
511 For more context, you can refer to the following
512 L<discussion thread|http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225066.html>.
513
514 =head1 Platform Support
515
516 =head2 Platform-Specific Notes
517
518 =head3 Win32
519
520 =over 4
521
522 =item *
523
524 Perl can now be built in C++ mode on Windows by setting the makefile macro
525 C<USE_CPLUSPLUS> to the value "define".
526
527 =item *
528
529 List form pipe open no longer falls back to the shell.
530
531 =item *
532
533 In release 5.21.8 compiling on VC with dmake was broken. Fixed.
534
535 =item *
536
537 New C<DebugSymbols> and C<DebugFull> configuration options added to
538 Windows makefiles.
539
540 =item *
541
542 L<B> now compiles again on Windows.
543
544 =back
545
546 =head3 Solaris
547
548 Look for the Sun Studio compiler in both F</opt/solstudio*> and
549 F</opt/solarisstudio*>.
550
551 =head3 VMS
552
553 =over 4
554
555 =item *
556
557 When spawning a subprocess without waiting, the return value is now
558 the correct PID.
559
560 =item *
561
562 Fix a prototype so linking doesn't fail under the VMS C++ compiler.
563
564 =back
565
566 =head1 Selected Bug Fixes
567
568 =over 4
569
570 =item *
571
572 Patterns starting with C</.*/> are now fast again. [rt.perl.org #123743]
573
574 =item *
575
576 The original visible value of C<$/> is now preserved when it is set to
577 an invalid value.  Previously if you set C<$/> to a reference to an
578 array, for example, perl would produce a runtime error and not set
579 C<PL_rs>, but perl code that checked C<$/> would see the array
580 reference.  [rt.perl.org #123218]
581
582 =item *
583
584 In a regular expression pattern, a POSIX class, like C<[:ascii:]>, must
585 be inside a bracketed character class, like C</qr[[:ascii:]]>.  A
586 warning is issued when something looking like a POSIX class is not
587 inside a bracketed class.  That warning wasn't getting generated when
588 the POSIX class was negated: C<[:^ascii:]>.  This is now fixed.
589
590 =item *
591
592 Fix a couple of other size calculation overflows.  [rt.perl.org #123554]
593
594 =item *
595
596 A bug introduced in 5.21.6, C<dump LABEL> acted the same as C<goto
597 LABEL>.  This has been fixed.  [rt.perl.org #123836]
598
599 =item *
600
601 Perl 5.14.0 introduced a bug whereby C<eval { LABEL: }> would crash.  This
602 has been fixed.  [rt.perl.org #123652]
603
604 =item *
605
606 Various crashes due to the parser getting confused by syntax errors have
607 been fixed.  [rt.perl.org #123617] [rt.perl.org #123737]
608 [rt.perl.org #123753] [rt.perl.org #123677]
609
610 =item *
611
612 Code like C</$a[/> used to read the next line of input and treat it as
613 though it came immediately after the opening bracket.  Some invalid code
614 consequently would parse and run, but some code caused crashes, so this is
615 now disallowed.  [rt.perl.org #123712]
616
617 =item *
618
619 Fix argument underflow for C<pack>.  [rt.perl.org #123874]
620
621 =item *
622
623 Fix handling of non-strict C<\x{}>. Now C<\x{}> is equivalent to C<\x{0}>
624 instead of faulting.
625
626 =item *
627
628 C<stat -t> is now no longer treated as stackable, just like C<-t stat>.
629 [rt.perl.org #123816]
630
631 =item *
632
633 The following no longer causes a SEGV: C<qr{x+(y(?0))*}>.
634
635 =item *
636
637 Fixed infinite loop in parsing backrefs in regexp patterns.
638
639 =item *
640
641 Several minor bug fixes in behavior of Inf and NaN, including
642 warnings when stringifying Inf-like or NaN-like strings. For example,
643 "NaNcy" doesn't numify to NaN anymore.
644
645 =item *
646
647 Only stringy classnames are now shared. This fixes some failures in L<autobox>.  [rt.cpan.org #100819]
648
649 =back
650
651 =head1 Acknowledgements
652
653 Perl 5.21.9 represents approximately 4 weeks of development since Perl 5.21.8
654 and contains approximately 170,000 lines of changes across 520 files from 32
655 authors.
656
657 Excluding auto-generated files, documentation and release tools, there were
658 approximately 160,000 lines of changes to 270 .pm, .t, .c and .h files.
659
660 Perl continues to flourish into its third decade thanks to a vibrant community
661 of users and developers. The following people are known to have contributed the
662 improvements that became Perl 5.21.9:
663
664 Chad Granum, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari
665 Mannsåker, Daniel Dragan, David Golden, David Mitchell, Father Chrysostomos,
666 H.Merijn Brand, Hugo van der Sanden, James E Keenan, James Raspass, Jarkko
667 Hietaniemi, Karen Etheridge, Karl Williamson, Kent Fredric, Lajos Veres, Leon
668 Timmermans, Lukas Mai, Mathieu Arnold, Matthew Horsfall, Peter Martini, Petr
669 Písař, Randy Stauner, Ricardo Signes, Sawyer X, Shlomi Fish, Sisyphus, Steve
670 Hay, Tony Cook, Yves Orton, Ævar Arnfjörð Bjarmason.
671
672 The list above is almost certainly incomplete as it is automatically generated
673 from version control history. In particular, it does not include the names of
674 the (very much appreciated) contributors who reported issues to the Perl bug
675 tracker.
676
677 Many of the changes included in this version originated in the CPAN modules
678 included in Perl's core. We're grateful to the entire CPAN community for
679 helping Perl to flourish.
680
681 For a more complete list of all of Perl's historical contributors, please see
682 the F<AUTHORS> file in the Perl source distribution.
683
684 =head1 Reporting Bugs
685
686 If you find what you think is a bug, you might check the articles recently
687 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
688 https://rt.perl.org/ .  There may also be information at
689 http://www.perl.org/ , the Perl Home Page.
690
691 If you believe you have an unreported bug, please run the L<perlbug> program
692 included with your release.  Be sure to trim your bug down to a tiny but
693 sufficient test case.  Your bug report, along with the output of C<perl -V>,
694 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
695
696 If the bug you are reporting has security implications, which make it
697 inappropriate to send to a publicly archived mailing list, then please send it
698 to perl5-security-report@perl.org.  This points to a closed subscription
699 unarchived mailing list, which includes all the core committers, who will be
700 able to help assess the impact of issues, figure out a resolution, and help
701 co-ordinate the release of patches to mitigate or fix the problem across all
702 platforms on which Perl is supported.  Please only use this address for
703 security issues in the Perl core, not for modules independently distributed on
704 CPAN.
705
706 =head1 SEE ALSO
707
708 The F<Changes> file for an explanation of how to view exhaustive details on
709 what changed.
710
711 The F<INSTALL> file for how to build Perl.
712
713 The F<README> file for general stuff.
714
715 The F<Artistic> and F<Copying> files for copyright information.
716
717 =cut