5 perldelta - what is new for perl v5.21.9
9 This document describes differences between the 5.21.8 release and the 5.21.9
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.
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.
20 =head1 Core Enhancements
22 =head2 qr/\b{gcb}/ is now handled in regular expressions
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.
31 =head2 qr/\b{wb}/ is now handled in regular expressions
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.
39 =head2 qr/\b{sb}/ is now handled in regular expressions
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.
45 =head2 New bitwise operators
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<&= |= ^= &.= |.= ^.=>).
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]
57 =head2 C<no re> covers more and is lexical
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.
63 =head1 Incompatible Changes
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.
69 =head1 Performance Enhancements
79 =head1 Modules and Pragmata
81 =head2 Updated Modules and Pragmata
87 L<attributes> has been upgraded from version 0.25 to 0.26.
91 L<B> has been upgraded from version 1.55 to 1.56.
95 L<B::Debug> has been upgraded from version 1.22 to 1.23.
99 L<B::Deparse> has been upgraded from version 1.32 to 1.33.
105 Deparse now provides a defined state sub in inner subs.
109 Since version Perl 5.21.6, Deparse would croak on special constants, but
110 this has now been fixed.
116 L<Benchmark> has been upgraded from version 1.19 to 1.20.
120 L<bigint>, L<bignum>, L<bigrat> have been upgraded to version 0.39.
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]
127 L<Carp> has been upgraded from version 1.34 to 1.35.
133 Carp now handles non-ASCII platforms better.
137 Off-by-one error fix for Perl < 5.14.
143 L<Config::Perl::V> has been upgraded from version 0.22 to 0.23.
147 L<CPAN::Meta::Requirements> has been upgraded from version 2.131 to 2.132
151 L<Devel::Peek> has been upgraded from version 1.21 to 1.22.
155 L<Encode> has been upgraded from version 2.67 to 2.70.
157 Building in C++ mode on Windows now works.
161 L<Errno> has been upgraded from version 1.22 to 1.23.
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
169 L<HTTP::Tiny> has been upgraded from version 0.053 to 0.054.
173 L<Opcode> has been upgraded from version 1.31 to 1.32.
177 L<Perl::OSType> has been upgraded from version 1.007 to 1.008.
181 L<PerlIO::scalar> has been upgraded from version 0.21 to 0.22.
183 Attempting to write at file positions impossible for the platform now
184 fail early rather than wrapping at 4GB.
188 L<Pod::Parser> has been upgraded from version 1.62 to 1.63.
192 L<Pod::Perldoc> has been upgraded from version 3.24 to 3.25.
196 L<POSIX> has been upgraded from version 1.49 to 1.51.
200 L<re> has been upgraded from version 0.30 to 0.31.
204 L<Socket> has been upgraded from version 2.016 to 2.018.
208 L<Test::Simple> has been upgraded from version 1.301001_097 to 1.301001_098.
212 L<Unicode::Collate> has been upgraded from version 1.10 to 1.11.
216 L<Unicode::UCD> has been upgraded from version 0.60 to 0.61.
222 A new function L<property_values()|Unicode::UCD/prop_values()>
223 has been added to return a given property's possible values.
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
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
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
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
252 This module now works on EBCDIC platforms.
258 L<VMS::Stdio> has been upgraded from version 2.4 to 2.41.
262 L<Win32> has been upgraded from version 0.49 to 0.51.
264 GetOSName() now supports Windows 8.1, and building in C++ mode now works.
268 L<Win32API::File> has been upgraded from version 0.1201 to 0.1202
270 Building in C++ mode now works.
276 =head2 New Documentation
278 =head3 L<perlrebackslash>
284 Added documentation of C<\b{sb}>, C<\b{wb}>, C<\b{gcb}>, and C<\b{g}>.
288 =head3 L<perlrequick>
294 Added example for C<\b{wb}>.
304 Added example for C<\b{wb}>.
308 =head2 Changes to Existing Documentation
310 =head3 L<perlunicode>
316 Update B<Default Word Boundaries> under
317 L<perlunicode/"Unicode Regular Expression Support Level">'s
318 B<Extended Unicode Support>.
322 =head3 L<perlunicook>
328 Clarify that autodie >= 2.26 works with C<use open>.
332 Correct warning message for C<use autodie> and C<use open>.
342 L<perlfaq> has been synchronized with version 5.021009 from CPAN.
352 Correct the version number which removes C<m?PATTERN?>. It was Perl 5.22.0.
362 Further clarify version number representations and usage.
366 =head3 L<perlmodstyle>
372 Instead of pointing to the module list, we are now pointing to PrePAN.
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>.
382 =head2 New Diagnostics
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/">
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>.
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">
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
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>" >>
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.
420 L<The bitwise feature is experimental|perldiag/"The bitwise feature is experimental">
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:
428 no warnings "experimental::bitwise";
429 use feature "bitwise";
434 =head2 Changes to Existing Diagnostics
440 B<Unusual use of %s in void context> has been removed. It might
441 come back in a future release.
445 L<Argument "%s" isn't numeric%s|perldiag/"Argument "%s" isn't numeric%s">
446 now adds the following note:
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.
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">.
460 =head1 Utility Changes
468 F<h2ph> now handles hexadecimal constants in the compiler's predefined
469 macro definitions, as visible in C<$Config{cppsymbols}>. [rt.perl.org
480 No longer depends on non-core module anymore.
484 =head1 Configuration and Compilation
490 F<Configure> now checks for F<lrintl>, F<lroundl>, F<llrintl>, and F<llroundl>.
500 Added F<t/op/dump.t> for testing C<dump>.
506 =head2 Support for new warnings categories outside of "all"
508 The new option for warnings outside the B<all> category in the L<warnings>
509 pragma has been removed for now.
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>.
514 =head1 Platform Support
516 =head2 Platform-Specific Notes
524 Perl can now be built in C++ mode on Windows by setting the makefile macro
525 C<USE_CPLUSPLUS> to the value "define".
529 List form pipe open no longer falls back to the shell.
533 In release 5.21.8 compiling on VC with dmake was broken. Fixed.
537 New C<DebugSymbols> and C<DebugFull> configuration options added to
542 L<B> now compiles again on Windows.
548 Look for the Sun Studio compiler in both F</opt/solstudio*> and
549 F</opt/solarisstudio*>.
557 When spawning a subprocess without waiting, the return value is now
562 Fix a prototype so linking doesn't fail under the VMS C++ compiler.
566 =head1 Selected Bug Fixes
572 Patterns starting with C</.*/> are now fast again. [rt.perl.org #123743]
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]
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.
592 Fix a couple of other size calculation overflows. [rt.perl.org #123554]
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]
601 Perl 5.14.0 introduced a bug whereby C<eval { LABEL: }> would crash. This
602 has been fixed. [rt.perl.org #123652]
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]
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]
619 Fix argument underflow for C<pack>. [rt.perl.org #123874]
623 Fix handling of non-strict C<\x{}>. Now C<\x{}> is equivalent to C<\x{0}>
628 C<stat -t> is now no longer treated as stackable, just like C<-t stat>.
629 [rt.perl.org #123816]
633 The following no longer causes a SEGV: C<qr{x+(y(?0))*}>.
637 Fixed infinite loop in parsing backrefs in regexp patterns.
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.
647 Only stringy classnames are now shared. This fixes some failures in L<autobox>. [rt.cpan.org #100819]
651 =head1 Acknowledgements
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
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.
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:
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.
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
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.
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.
684 =head1 Reporting Bugs
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.
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.
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
708 The F<Changes> file for an explanation of how to view exhaustive details on
711 The F<INSTALL> file for how to build Perl.
713 The F<README> file for general stuff.
715 The F<Artistic> and F<Copying> files for copyright information.