New release date for 5.12.1 in light of the new RC
[p5sagit/p5-mst-13.2.git] / pod / perl5113delta.pod
CommitLineData
2e8102e6 1=head1 NAME
2
85a8e0aa 3perl5113delta - what is new for perl v5.11.3
2e8102e6 4
5=head1 DESCRIPTION
6
166777da 7This document describes differences between the 5.11.2 release and
2e8102e6 8the 5.11.3 release.
9
c308b6b9 10If you are upgrading from an earlier release such as 5.11.1, first read
11the L<perl5112delta>, which describes differences between 5.11.1 and
125.11.2
2e8102e6 13
14=head1 Incompatible Changes
15
205b2220 16=head2 Filehandles are blessed directly into C<IO::Handle>, as C<FileHandle> is merely a wrapper around C<IO::Handle>.
1f5724d9 17
d350938a 18The previous behaviour was to bless Filehandles into L<FileHandle>
c308b6b9 19(an empty proxy class) if it was loaded into memory and otherwise
205b2220 20to bless them into C<IO::Handle>.
2e8102e6 21
22=head1 Core Enhancements
23
283b82dc 24=head2 Unicode version
25
51f494cc 26Perl is shipped with the latest Unicode version, 5.2, dated October 2009. See
283b82dc 27L<http://www.unicode.org/versions/Unicode5.2.0> for details about this release
db2ed548 28of Unicode. See L<perlunicode> for instructions on installing and using
29older versions of Unicode.
37e2e78e 30
8d814567 31=head2 Unicode properties
32
33Perl can now handle every Unicode character property. A new pod,
34L<perluniprops>, lists all available non-Unihan character properties. By
35default the Unihan properties and certain others (deprecated and Unicode
36internal-only ones) are not exposed. See below for more details on
37these; there is also a section in the pod listing them, and why they are
38not exposed.
39
40Perl now fully supports the Unicode compound-style of using C<=> and C<:>
41in writing regular expressions: C<\p{property=value}> and
42C<\p{property:value}> (both of which mean the same thing).
43
db2ed548 44Perl now fully supports the Unicode loose matching rules for text
8d814567 45between the braces in C<\p{...}> constructs. In addition, Perl also allows
46underscores between digits of numbers.
47
48All the Unicode-defined synonyms for properties and property values are
49now accepted.
50
37e2e78e 51C<qr/\X/>, which matches a Unicode logical character, has been expanded to work
52better with various Asian languages. It now is defined as an C<extended
51f494cc 53grapheme cluster>. (See L<http://www.unicode.org/reports/tr29/>).
c670e63a 54Anything matched previously that made sense will continue to be matched. But
55in addition:
51f494cc 56
57=over
58
59=item *
60
61C<\X> will now not break apart a C<S<CR LF>> sequence.
62
63=item *
64
65C<\X> will now match a sequence including the C<ZWJ> and C<ZWNJ> characters.
66
67=item *
68
69C<\X> will now always match at least one character, including an initial mark.
70Marks generally come after a base character, but it is possible in Unicode to
71have them in isolation, and C<\X> will now handle that case, for example at the
c670e63a 72beginning of a line or after a C<ZWSP>. And this is the part where C<\X>
73doesn't match the things that it used to that don't make sense. Formerly, for
74example, you could have the nonsensical case of an accented LF.
51f494cc 75
76=item *
77
78C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai and Lao
79exception cases.
80
81=back
82
83Otherwise, this change should be transparent for the non-affected languages.
37e2e78e 84
8d814567 85C<\p{...}> matches using the Canonical_Combining_Class property were
86completely broken in previous Perls. This is now fixed.
87
51f494cc 88In previous Perls, the Unicode C<Decomposition_Type=Compat> property and a
8d814567 89Perl extension had the same name, which led to neither matching all the
90correct values (with more than 100 mistakes in one, and several thousand
91in the other). The Perl extension has now been renamed to be
51f494cc 92C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the same
8d814567 93meaning as was previously intended, namely the union of all the
51f494cc 94non-canonical Decomposition types, with Unicode C<Compat> being just one of
8d814567 95those.
96
97C<\p{Uppercase}> and C<\p{Lowercase}> have been brought into line with the
98Unicode definitions. This means they each match a few more characters
99than previously.
100
101C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This means it
102no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format
103(gc=cf) code points. The Format code points represent the biggest
104possible problem. All but 36 of them are either officially deprecated
105or strongly discouraged from being used. Of those 36, likely the most
106widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and
107similar, plus Bi-directional controls.
108
109C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. The Perl
110definition included a number of things that aren't really alpha (all
51f494cc 111marks), while omitting many that were. As a direct consequence, the
8d814567 112definitions of C<\p{Alnum}> and C<\p{Word}> which depend on Alpha also change.
113
114C<\p{Word}> also now doesn't match certain characters it wasn't supposed
115to, such as fractions.
116
51f494cc 117C<\p{Print}> no longer matches the line control characters: Tab, LF, CR,
118FF, VT, and NEL. This brings it in line with the documentation.
8d814567 119
51f494cc 120C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables.
8d814567 121
122The Numeric type property has been extended to include the Unihan
123characters.
124
51f494cc 125There is a new Perl extension, the 'Present_In', or simply 'In',
8d814567 126property. This is an extension of the Unicode Age property, but
51f494cc 127C<\p{In=5.0}> matches any code point whose usage has been determined
128I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points
129added in I<precisely> version 5.0.
8d814567 130
131A number of properties did not have the correct values for unassigned
132code points. This is now fixed. The affected properties are
133Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type,
134Hangul_Syllable_Type, Numeric_Type, and Line_Break.
135
136The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
51f494cc 137have been updated to their current Unicode definitions.
8d814567 138
139Certain properties that are supposed to be Unicode internal-only were
140erroneously exposed by previous Perls. Use of these in regular
51f494cc 141expressions will now generate, if enabled, a deprecated warning message.
142The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point,
143Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase,
144Other_Math, and Other_Uppercase.
8d814567 145
8d814567 146An installation can now fairly easily change which Unicode properties
147Perl understands. As mentioned above, certain properties are by default
148turned off. These include all the Unihan properties (which should be
149accessible via the CPAN module Unicode::Unihan) and any deprecated or
150Unicode internal-only property that Perl has never exposed.
151
d350938a 152The generated files in the C<lib/unicore/To> directory are now more
153clearly marked as being stable, directly usable by applications.
154New hash entries in them give the format of the normal entries,
155which allows for easier machine parsing. Perl can generate files
156in this directory for any property, though most are suppressed. An
157installation can choose to change which get written. Instructions
158are in L<perluniprops>.
8d814567 159
89dbd0d1 160=head2 Regular Expressions
161
d350938a 162U+0FFFF is now a legal character in regular expressions.
89dbd0d1 163
2e8102e6 164=head1 Modules and Pragmata
165
2e8102e6 166=head2 Pragmata Changes
167
168=over 4
169
7da18641 170=item C<constant>
171
172Upgraded from version 1.19 to 1.20.
173
19185491 174=item C<diagnostics>
175
176This pragma no longer suppresses C<Use of uninitialized value in range (or flip)> warnings. [perl #71204]
177
db2ed548 178=item C<feature>
179
180Upgraded from 1.13 to 1.14. Added the C<unicode_strings> feature:
181
182 use feature "unicode_strings";
ecb37473 183
f43e267d 184This pragma turns on Unicode semantics for the case-changing operations
db2ed548 185(uc/lc/ucfirst/lcfirst) on strings that don't have the internal UTF-8 flag set,
186but that contain single-byte characters between 128 and 255.
ecb37473 187
f43e267d 188=item C<legacy>
2e8102e6 189
f43e267d 190The experimental C<legacy> pragma, introduced in 5.11.2, has been removed,
db2ed548 191and its functionality replaced by the new feature pragma, C<use feature
f43e267d 192"unicode_strings">.
2e8102e6 193
7da18641 194=item C<threads>
195
196Upgraded from version 1.74 to 1.75.
197
db2ed548 198=item C<warnings>
2e8102e6 199
db2ed548 200Upgraded from 1.07 to 1.08. Added new C<warnings::fatal_enabled()> function.
09b2a3d2 201
db2ed548 202=back
09b2a3d2 203
db2ed548 204=head2 Updated Modules
09b2a3d2 205
7da18641 206=over 4
207
208=item C<Archive::Extract>
209
210Upgraded from version 0.34 to 0.36.
211
212=item C<CPAN>
213
205b2220 214Upgraded from version 1.94_51 to 1.94_5301, which is 1.94_53 on CPAN
49ded548 215plus some local fixes for bleadperl.
1e97cd45 216
217Includes better bzip2 support, improved FirstTime experience with
218auto-selection of CPAN mirrors, proper handling of modules removed from the
219Perl core, and an updated 'cpan' utility script
7da18641 220
221=item C<CPANPLUS>
222
223Upgraded from version 0.89_09 to 0.90.
224
1069d95b 225=item C<Encode>
226
227Upgraded from version 2.38 to 2.39.
228
7da18641 229=item C<ExtUtils::MakeMaker>
230
6a90494c 231Upgraded from version 6.55_02 to 6.56. Adds new BUILD_REQUIRES key to
232indicate build-only prerequisites. Also adds support for
233mingw64 and the new "package NAME VERSION" syntax.
7da18641 234
235=item C<File::Path>
236
237Upgraded from version 2.08 to 2.08_01.
238
239=item C<Module::Build>
240
6a90494c 241Upgraded from version 0.35_09 to 0.36. Compared to 0.35, this version has a
242new 'installdeps' action, supports the PERL_MB_OPT environment variable, adds a
243'share_dir' property for L<File::ShareDir> support, support the "package NAME
244VERSION" syntax and has many other enhancements and bug fixes. The
245'passthrough' style of Module::Build::Compat has been deprecated.
7da18641 246
247=item C<Module::CoreList>
248
249Upgraded from version 2.23 to 2.24.
250
19185491 251=item C<POSIX>
252
205b2220 253Upgraded from version 1.18 to 1.19. Error codes for C<getaddrinfo()> and
254C<getnameinfo()> are now available.
19185491 255
7da18641 256=item C<Pod::Simple>
257
258Upgraded from version 3.10 to 3.13.
259
260=item C<Safe>
261
262Upgraded from version 2.19 to 2.20.
263
264=back
265
2e8102e6 266=head1 Utility Changes
267
2e8102e6 268=over 4
269
db2ed548 270=item F<perlbug>
2e8102e6 271
db2ed548 272No longer reports "Message sent" when it hasn't actually sent the message
1f5724d9 273
2e8102e6 274=back
275
2e8102e6 276=head1 Changes to Existing Documentation
277
9c455b5f 278The Pod specification (L<perlpodspec>) has been updated to bring the
279specification in line with modern usage already supported by most Pod systems.
280A parameter string may now follow the format name in a "begin/end" region.
1f5724d9 281Links to URIs with a text description are now allowed. The usage of
282C<LE<lt>"section"E<gt>> has been marked as deprecated.
9c455b5f 283
284L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
285conditional loading of modules despite the implicit BEGIN block around C<use>.
874e3373 286
287
288
2e8102e6 289=head1 Installation and Configuration Improvements
290
ecb37473 291=head2 Testing improvements
292
293=over 4
294
295=item It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
296
297=back
298
2e8102e6 299=head2 Platform Specific Changes
300
301=over 4
302
874e3373 303=item Win32
2e8102e6 304
db2ed548 305=over 4
ecb37473 306
307=item *
308
205b2220 309Always add a manifest resource to C<perl.exe> to specify the C<trustInfo>
ecb37473 310settings for Windows Vista and later. Without this setting Windows
311will treat C<perl.exe> as a legacy application and apply various
312heuristics like redirecting access to protected file system areas
313(like the "Program Files" folder) to the users "VirtualStore"
314instead of generating a proper "permission denied" error.
315
316For VC8 and VC9 this manifest setting is automatically generated by
317the compiler/linker (together with the binding information for their
318respective runtime libraries); for all other compilers we need to
319embed the manifest resource explicitly in the external resource file.
320
321This change also requests the Microsoft Common-Controls version 6.0
322(themed controls introduced in Windows XP) via the dependency list
323in the assembly manifest. For VC8 and VC9 this is specified using the
324C</manifestdependency> linker commandline option instead.
325
326=back
327
328=item cygwin
329
330=over 4
331
332=item Enable IPv6 support on cygwin 1.7 and newer
333
334=back
874e3373 335
336=item OpenVMS
2e8102e6 337
ecb37473 338=over 4
339
340=item Make -UDEBUGGING the default on VMS for 5.12.0.
341
342Like it has been everywhere else for ages and ages. Also make
343command-line selection of -UDEBUGGING and -DDEBUGGING work in
344configure.com; before the only way to turn it off was by saying
345no in answer to the interactive question.
346
2e8102e6 347=back
348
1f5724d9 349=back
350
2e8102e6 351=head1 Selected Bug Fixes
352
2e8102e6 353=over 4
354
355=item *
356
ecb37473 357Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852.
358
359Instead of returning a(nother) reference to the (pre-compiled) regexp in the
360optree, use reg_temp_copy() to create a copy of it, and return a reference to
361that. This resolves issues about Regexp::DESTROY not being called in a timely
362fashion (the original bug tracked by RT #69852), as well as bugs related to
363blessing regexps, and of assigning to regexps, as described in correspondence
364added to the ticket.
365
366It transpires that we also need to undo the SvPVX() sharing when ithreads
367cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned
368copy of the mother_re. This change might fix bugs with regexps and threads in
369certain other situations, but as yet neither tests nor bug reports have
370indicated any problems, so it might not actually be an edge case that it's
371possible to reach.
372
373=item *
374
375Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed.
376
377=item *
378
379Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
2e8102e6 380
9889e3de 381=item *
382
383F<-t> should only return TRUE for file handles connected to a TTY
384
385The Microsoft C version of isatty() returns TRUE for all
386character mode devices, including the /dev/null style "nul"
387device and printers like "lpt1".
388
389=item *
390
205b2220 391Fixed a regression caused by commit fafafbaf which caused a panic during
392parameter passing [perl #70171]
9889e3de 393
394=item *
395
205b2220 396On systems which in-place edits without backup files, -i'*' now works as
397the documentation says it does [perl #70802]
9889e3de 398
19185491 399=item *
400
fa4ee1ee 401Saving and restoring magic flags no longer loses readonly flag.
402
403=item *
404
405The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer
406causes abrupt and total failure.
407
408=item *
409
410Regular expressions compiled with C<qr{}> literals properly set C<$'> when
411matching again.
412
413=item *
414
415Using named subroutines with C<sort> should no longer lead to bus errors [perl
416#71076]
417
418=item *
419
19185491 420Numerous bugfixes catch small issues caused by the recently-added Lexer API.
421
422=item *
423
e1020413 424Smart match against C<@_> sometimes gave false negatives. [perl #71078]
19185491 425
426=item *
427
428C<$@> may now be assigned a read-only value (without error or busting the stack).
9889e3de 429
4656de94 430=item *
431
205b2220 432C<sort> called recursively from within an active comparison subroutine no
433longer causes a bus error if run multiple times. [perl #71076]
4656de94 434
2e8102e6 435=back
436
437=head1 New or Changed Diagnostics
438
2e8102e6 439=over 4
440
fa4ee1ee 441=item *
2e8102e6 442
fa4ee1ee 443C<split> now warns when called in void context
2e8102e6 444
2e8102e6 445=item *
446
205b2220 447C<printf>-style functions called with too few arguments will now issue the
448warning C<"Missing argument in %s"> [perl #71000]
2e8102e6 449
450=back
451
452=head1 New Tests
453
d659d22b 454Many modules updated from CPAN incorporate new tests.
2e8102e6 455
456=over 4
457
d659d22b 458=item t/comp/final_line_num.t
2e8102e6 459
d659d22b 460See if line numbers are correct at EOF
461
462=item t/comp/form_scope.t
463
464See if format scoping works
465
466=item t/comp/line_debug.t
467
468See if @{"_<$file"} works
469
470=item t/op/filetest_t.t
471
472See if -t file test works
473
474=item t/op/qr.t
475
476See if qr works
477
478=item t/op/utf8cache.t
479
480Tests malfunctions of utf8 cache
481
482=item t/re/uniprops.t
483
484Test unicode \p{} regex constructs
2e8102e6 485
486=back
487
2e8102e6 488=head1 Deprecations
489
2e8102e6 490The following items are now deprecated.
491
492=over 4
493
13a4a486 494=item Use of "goto" to jump into a construct is deprecated
2e8102e6 495
13a4a486 496Using C<goto> to jump from an outer scope into an inner
497scope is now deprecated. This rare use case was causing
498problems in the implementation of scopes.
2e8102e6 499
500=back
501
2e8102e6 502=head1 Acknowledgements
503
d350938a 504Perl 5.11.3 represents approximately one month of development since
505Perl 5.11.2 and contains 61407 lines of changes across 396 files
506from 40 authors and committers:
507
508Abigail, Alex Davies, Alexandr Ciornii, Andrew Rodland, Andy
509Dougherty, Bram, brian d foy, Chip Salzenberg, Chris Williams, Craig
510A. Berry, Daniel Frederick Crisman, David Golden, Dennis Kaarsemaker,
511Eric Brine, Father Chrysostomos, Gene Sullivan, Gerard Goossen, H.
512Merijn Brand, Hugo van der Sanden, Jan Dubois, Jerry D. Hedden,
513Jesse Vincent, Jim Cromie, Karl Williamson, Leon Brocard, Max
514Maischein, Michael Breen, Moritz Lenz, Nicholas Clark, Rafael
515Garcia-Suarez, Reini Urban, Ricardo Signes, Stepan Kasal, Steve
516Hay, Steve Peters, Tim Bunce, Tony Cook, Vincent Pit and Zefram.
517
518Many of the changes included in this version originated in the CPAN
519modules included in Perl's core. We're grateful to the entire CPAN
520community for helping Perl to flourish.
2e8102e6 521
522=head1 Reporting Bugs
523
524If you find what you think is a bug, you might check the articles
525recently posted to the comp.lang.perl.misc newsgroup and the perl
526bug database at http://rt.perl.org/perlbug/ . There may also be
527information at http://www.perl.org/ , the Perl Home Page.
528
529If you believe you have an unreported bug, please run the B<perlbug>
530program included with your release. Be sure to trim your bug down
531to a tiny but sufficient test case. Your bug report, along with the
532output of C<perl -V>, will be sent off to perlbug@perl.org to be
533analysed by the Perl porting team.
534
535If the bug you are reporting has security implications, which make it
536inappropriate to send to a publicly archived mailing list, then please send
537it to perl5-security-report@perl.org. This points to a closed subscription
538unarchived mailing list, which includes all the core committers, who be able
539to help assess the impact of issues, figure out a resolution, and help
540co-ordinate the release of patches to mitigate or fix the problem across all
541platforms on which Perl is supported. Please only use this address for
542security issues in the Perl core, not for modules independently
543distributed on CPAN.
544
545=head1 SEE ALSO
546
547The F<Changes> file for an explanation of how to view exhaustive details
548on what changed.
549
550The F<INSTALL> file for how to build Perl.
551
552The F<README> file for general stuff.
553
554The F<Artistic> and F<Copying> files for copyright information.
555
556=cut
7ef88767 557
558