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