3 perldelta - what is new for perl v5.11.3
7 This document describes differences between the 5.11.2 release and
10 If you are upgrading from an earlier release such as 5.11.1, first read
11 the L<perl5112delta>, which describes differences between 5.11.1 and
14 =head1 Incompatible Changes
18 =item Filehandles are blessed directly into C<IO::Handle::>, as C<FileHandle> is merely a wrapper around C<IO::Handle>.
20 The previous behaviour was to bless Filehandles into L<FileHandle>
21 (an empty proxy class) if it was loaded into memory and otherwise
22 to bless them into C<IO::Handle::>.
27 =head1 Core Enhancements
29 =head2 Unicode version
31 Perl is shipped with the latest Unicode version, 5.2, dated October 2009. See
32 L<http://www.unicode.org/versions/Unicode5.2.0> for details about this release
33 of Unicode. See L<perlunicode> for instructions on installing and using
34 older versions of Unicode.
36 =head2 Unicode properties
38 Perl can now handle every Unicode character property. A new pod,
39 L<perluniprops>, lists all available non-Unihan character properties. By
40 default the Unihan properties and certain others (deprecated and Unicode
41 internal-only ones) are not exposed. See below for more details on
42 these; there is also a section in the pod listing them, and why they are
45 Perl now fully supports the Unicode compound-style of using C<=> and C<:>
46 in writing regular expressions: C<\p{property=value}> and
47 C<\p{property:value}> (both of which mean the same thing).
49 Perl now fully supports the Unicode loose matching rules for text
50 between the braces in C<\p{...}> constructs. In addition, Perl also allows
51 underscores between digits of numbers.
53 All the Unicode-defined synonyms for properties and property values are
56 C<qr/\X/>, which matches a Unicode logical character, has been expanded to work
57 better with various Asian languages. It now is defined as an C<extended
58 grapheme cluster>. (See L<http://www.unicode.org/reports/tr29/>).
59 Anything matched previously that made sense will continue to be matched. But
66 C<\X> will now not break apart a C<S<CR LF>> sequence.
70 C<\X> will now match a sequence including the C<ZWJ> and C<ZWNJ> characters.
74 C<\X> will now always match at least one character, including an initial mark.
75 Marks generally come after a base character, but it is possible in Unicode to
76 have them in isolation, and C<\X> will now handle that case, for example at the
77 beginning of a line or after a C<ZWSP>. And this is the part where C<\X>
78 doesn't match the things that it used to that don't make sense. Formerly, for
79 example, you could have the nonsensical case of an accented LF.
83 C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai and Lao
88 Otherwise, this change should be transparent for the non-affected languages.
90 C<\p{...}> matches using the Canonical_Combining_Class property were
91 completely broken in previous Perls. This is now fixed.
93 In previous Perls, the Unicode C<Decomposition_Type=Compat> property and a
94 Perl extension had the same name, which led to neither matching all the
95 correct values (with more than 100 mistakes in one, and several thousand
96 in the other). The Perl extension has now been renamed to be
97 C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the same
98 meaning as was previously intended, namely the union of all the
99 non-canonical Decomposition types, with Unicode C<Compat> being just one of
102 C<\p{Uppercase}> and C<\p{Lowercase}> have been brought into line with the
103 Unicode definitions. This means they each match a few more characters
106 C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This means it
107 no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format
108 (gc=cf) code points. The Format code points represent the biggest
109 possible problem. All but 36 of them are either officially deprecated
110 or strongly discouraged from being used. Of those 36, likely the most
111 widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and
112 similar, plus Bi-directional controls.
114 C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. The Perl
115 definition included a number of things that aren't really alpha (all
116 marks), while omitting many that were. As a direct consequence, the
117 definitions of C<\p{Alnum}> and C<\p{Word}> which depend on Alpha also change.
119 C<\p{Word}> also now doesn't match certain characters it wasn't supposed
120 to, such as fractions.
122 C<\p{Print}> no longer matches the line control characters: Tab, LF, CR,
123 FF, VT, and NEL. This brings it in line with the documentation.
125 C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables.
127 The Numeric type property has been extended to include the Unihan
130 There is a new Perl extension, the 'Present_In', or simply 'In',
131 property. This is an extension of the Unicode Age property, but
132 C<\p{In=5.0}> matches any code point whose usage has been determined
133 I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points
134 added in I<precisely> version 5.0.
136 A number of properties did not have the correct values for unassigned
137 code points. This is now fixed. The affected properties are
138 Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type,
139 Hangul_Syllable_Type, Numeric_Type, and Line_Break.
141 The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
142 have been updated to their current Unicode definitions.
144 Certain properties that are supposed to be Unicode internal-only were
145 erroneously exposed by previous Perls. Use of these in regular
146 expressions will now generate, if enabled, a deprecated warning message.
147 The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point,
148 Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase,
149 Other_Math, and Other_Uppercase.
151 An installation can now fairly easily change which Unicode properties
152 Perl understands. As mentioned above, certain properties are by default
153 turned off. These include all the Unihan properties (which should be
154 accessible via the CPAN module Unicode::Unihan) and any deprecated or
155 Unicode internal-only property that Perl has never exposed.
157 The generated files in the C<lib/unicore/To> directory are now more
158 clearly marked as being stable, directly usable by applications.
159 New hash entries in them give the format of the normal entries,
160 which allows for easier machine parsing. Perl can generate files
161 in this directory for any property, though most are suppressed. An
162 installation can choose to change which get written. Instructions
163 are in L<perluniprops>.
165 =head2 Regular Expressions
167 U+0FFFF is now a legal character in regular expressions.
169 =head1 Modules and Pragmata
171 =head2 Pragmata Changes
177 Upgraded from version 1.19 to 1.20.
181 This pragma no longer suppresses C<Use of uninitialized value in range (or flip)> warnings. [perl #71204]
185 Upgraded from 1.13 to 1.14. Added the C<unicode_strings> feature:
187 use feature "unicode_strings";
189 This pragma turns on Unicode semantics for the case-changing operations
190 (uc/lc/ucfirst/lcfirst) on strings that don't have the internal UTF-8 flag set,
191 but that contain single-byte characters between 128 and 255.
195 The experimental C<legacy> pragma, introduced in 5.11.2, has been removed,
196 and its functionality replaced by the new feature pragma, C<use feature
201 Upgraded from version 1.74 to 1.75.
205 Upgraded from 1.07 to 1.08. Added new C<warnings::fatal_enabled()> function.
209 =head2 Updated Modules
213 =item C<Archive::Extract>
215 Upgraded from version 0.34 to 0.36.
219 Upgraded from version 1.94_51 to 1.94_5301, which is 1.94_53 on CPAN
220 plus some local fixes for bleadperl.
222 Includes better bzip2 support, improved FirstTime experience with
223 auto-selection of CPAN mirrors, proper handling of modules removed from the
224 Perl core, and an updated 'cpan' utility script
228 Upgraded from version 0.89_09 to 0.90.
232 Upgraded from version 2.38 to 2.39.
234 =item C<ExtUtils::MakeMaker>
236 Upgraded from version 6.55_02 to 6.56. Adds new BUILD_REQUIRES key to
237 indicate build-only prerequisites. Also adds support for
238 mingw64 and the new "package NAME VERSION" syntax.
242 Upgraded from version 2.08 to 2.08_01.
244 =item C<Module::Build>
246 Upgraded from version 0.35_09 to 0.36. Compared to 0.35, this version has a
247 new 'installdeps' action, supports the PERL_MB_OPT environment variable, adds a
248 'share_dir' property for L<File::ShareDir> support, support the "package NAME
249 VERSION" syntax and has many other enhancements and bug fixes. The
250 'passthrough' style of Module::Build::Compat has been deprecated.
252 =item C<Module::CoreList>
254 Upgraded from version 2.23 to 2.24.
258 Upgraded from version 1.18 to 1.19. Error codes for C<getaddrinfo()> and C<getnameinfo()> are now
263 Upgraded from version 3.10 to 3.13.
267 Upgraded from version 2.19 to 2.20.
271 =head1 Utility Changes
277 No longer reports "Message sent" when it hasn't actually sent the message
281 =head1 Changes to Existing Documentation
283 The Pod specification (L<perlpodspec>) has been updated to bring the
284 specification in line with modern usage already supported by most Pod systems.
285 A parameter string may now follow the format name in a "begin/end" region.
286 Links to URIs with a text description are now allowed. The usage of
287 C<LE<lt>"section"E<gt>> has been marked as deprecated.
289 L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
290 conditional loading of modules despite the implicit BEGIN block around C<use>.
294 =head1 Installation and Configuration Improvements
296 =head2 Testing improvements
300 =item It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
304 =head2 Platform Specific Changes
314 Always add a manifest resource to C<perl.exe> to specify the <trustInfo>
315 settings for Windows Vista and later. Without this setting Windows
316 will treat C<perl.exe> as a legacy application and apply various
317 heuristics like redirecting access to protected file system areas
318 (like the "Program Files" folder) to the users "VirtualStore"
319 instead of generating a proper "permission denied" error.
321 For VC8 and VC9 this manifest setting is automatically generated by
322 the compiler/linker (together with the binding information for their
323 respective runtime libraries); for all other compilers we need to
324 embed the manifest resource explicitly in the external resource file.
326 This change also requests the Microsoft Common-Controls version 6.0
327 (themed controls introduced in Windows XP) via the dependency list
328 in the assembly manifest. For VC8 and VC9 this is specified using the
329 C</manifestdependency> linker commandline option instead.
337 =item Enable IPv6 support on cygwin 1.7 and newer
345 =item Make -UDEBUGGING the default on VMS for 5.12.0.
347 Like it has been everywhere else for ages and ages. Also make
348 command-line selection of -UDEBUGGING and -DDEBUGGING work in
349 configure.com; before the only way to turn it off was by saying
350 no in answer to the interactive question.
356 =head1 Selected Bug Fixes
362 Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852.
364 Instead of returning a(nother) reference to the (pre-compiled) regexp in the
365 optree, use reg_temp_copy() to create a copy of it, and return a reference to
366 that. This resolves issues about Regexp::DESTROY not being called in a timely
367 fashion (the original bug tracked by RT #69852), as well as bugs related to
368 blessing regexps, and of assigning to regexps, as described in correspondence
371 It transpires that we also need to undo the SvPVX() sharing when ithreads
372 cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned
373 copy of the mother_re. This change might fix bugs with regexps and threads in
374 certain other situations, but as yet neither tests nor bug reports have
375 indicated any problems, so it might not actually be an edge case that it's
380 Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed.
384 Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
388 F<-t> should only return TRUE for file handles connected to a TTY
390 The Microsoft C version of isatty() returns TRUE for all
391 character mode devices, including the /dev/null style "nul"
392 device and printers like "lpt1".
396 Fixed a regression caused by commit fafafbaf which caused a panic during parameter passing [perl #70171]
401 On systems which in-place edits without backup files, -i'*' now works as the documentation says it does [perl #70802]
405 Saving and restoring magic flags no longer loses readonly flag.
409 The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer
410 causes abrupt and total failure.
414 Regular expressions compiled with C<qr{}> literals properly set C<$'> when
419 Using named subroutines with C<sort> should no longer lead to bus errors [perl
424 Numerous bugfixes catch small issues caused by the recently-added Lexer API.
428 Smart match against C<@_> sometimes gave false negatives negatives. [perl #71078]
432 C<$@> may now be assigned a read-only value (without error or busting the stack).
436 C<sort> called recursively from within an active comparison subroutine no longer causes a bus error if run multiple times. [perl #71076]
440 =head1 New or Changed Diagnostics
446 C<split> now warns when called in void context
451 C<printf>-style functions called with too few arguments will now issue the warning C<"Missing argument in %s"> [perl #71000]
458 Many modules updated from CPAN incorporate new tests.
462 =item t/comp/final_line_num.t
464 See if line numbers are correct at EOF
466 =item t/comp/form_scope.t
468 See if format scoping works
470 =item t/comp/line_debug.t
472 See if @{"_<$file"} works
474 =item t/op/filetest_t.t
476 See if -t file test works
482 =item t/op/utf8cache.t
484 Tests malfunctions of utf8 cache
486 =item t/re/uniprops.t
488 Test unicode \p{} regex constructs
494 The following items are now deprecated.
498 =item Use of "goto" to jump into a construct is deprecated
500 Using C<goto> to jump from an outer scope into an inner
501 scope is now deprecated. This rare use case was causing
502 problems in the implementation of scopes.
506 =head1 Acknowledgements
508 Perl 5.11.3 represents approximately one month of development since
509 Perl 5.11.2 and contains 61407 lines of changes across 396 files
510 from 40 authors and committers:
512 Abigail, Alex Davies, Alexandr Ciornii, Andrew Rodland, Andy
513 Dougherty, Bram, brian d foy, Chip Salzenberg, Chris Williams, Craig
514 A. Berry, Daniel Frederick Crisman, David Golden, Dennis Kaarsemaker,
515 Eric Brine, Father Chrysostomos, Gene Sullivan, Gerard Goossen, H.
516 Merijn Brand, Hugo van der Sanden, Jan Dubois, Jerry D. Hedden,
517 Jesse Vincent, Jim Cromie, Karl Williamson, Leon Brocard, Max
518 Maischein, Michael Breen, Moritz Lenz, Nicholas Clark, Rafael
519 Garcia-Suarez, Reini Urban, Ricardo Signes, Stepan Kasal, Steve
520 Hay, Steve Peters, Tim Bunce, Tony Cook, Vincent Pit and Zefram.
522 Many of the changes included in this version originated in the CPAN
523 modules included in Perl's core. We're grateful to the entire CPAN
524 community for helping Perl to flourish.
526 =head1 Reporting Bugs
528 If you find what you think is a bug, you might check the articles
529 recently posted to the comp.lang.perl.misc newsgroup and the perl
530 bug database at http://rt.perl.org/perlbug/ . There may also be
531 information at http://www.perl.org/ , the Perl Home Page.
533 If you believe you have an unreported bug, please run the B<perlbug>
534 program included with your release. Be sure to trim your bug down
535 to a tiny but sufficient test case. Your bug report, along with the
536 output of C<perl -V>, will be sent off to perlbug@perl.org to be
537 analysed by the Perl porting team.
539 If the bug you are reporting has security implications, which make it
540 inappropriate to send to a publicly archived mailing list, then please send
541 it to perl5-security-report@perl.org. This points to a closed subscription
542 unarchived mailing list, which includes all the core committers, who be able
543 to help assess the impact of issues, figure out a resolution, and help
544 co-ordinate the release of patches to mitigate or fix the problem across all
545 platforms on which Perl is supported. Please only use this address for
546 security issues in the Perl core, not for modules independently
551 The F<Changes> file for an explanation of how to view exhaustive details
554 The F<INSTALL> file for how to build Perl.
556 The F<README> file for general stuff.
558 The F<Artistic> and F<Copying> files for copyright information.