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