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