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