268f30a4d4539dd8e6b19abf7f2f689bfc900bab
[p5sagit/p5-mst-13.2.git] / pod / perl5113delta.pod
1 =head1 NAME
2
3 [ this is a template for a new perldelta file. Any text flagged as
4 XXX needs to be processed before release. ]
5
6 perldelta - what is new for perl v5.11.3
7
8 =head1 DESCRIPTION
9
10 This document describes differences between the 5.11.2 release and
11 the 5.11.3 release.
12
13 If you are upgrading from an earlier release such as 5.11.3, first read
14 the L<perl5XXXdelta>, which describes differences between 5.11.3 and
15 5.10.0
16
17 =head1 Notice
18
19 XXX Any important notices here
20
21 =head1 Incompatible Changes
22
23 =over
24
25 =item Filehandles are blessed directly into C<IO::Handle::>, as C<FileHandle> is merely a wrapper around C<IO::Handle>.
26
27 XXX Some description of why this change was made would be nice -- e.g. what
28 the benefit that justifies the incompatibility -- dagolden, 2009-12-20
29
30 =back
31
32 =head1 Core Enhancements
33
34 XXX New core language features go here. Summarise user-visible core language
35 enhancements. Particularly prominent performance optimisations could go
36 here, but most should go in the L</Performance Enhancements> section.
37
38 =head2 Unicode version
39
40 Perl is shipped with the latest Unicode version, 5.2, October 2009.  See
41 L<http://www.unicode.org/versions/Unicode5.2.0> for details about this release
42 of Unicode.  See L<perlunicode> for instructions on installing and using
43 older versions of Unicode.
44
45 =head2 Unicode properties
46
47 Perl can now handle every Unicode character property.  A new pod,
48 L<perluniprops>, lists all available non-Unihan character properties.  By
49 default the Unihan properties and certain others (deprecated and Unicode
50 internal-only ones) are not exposed.  See below for more details on
51 these; there is also a section in the pod listing them, and why they are
52 not exposed.
53
54 Perl now fully supports the Unicode compound-style of using C<=> and C<:>
55 in writing regular expressions: C<\p{property=value}> and
56 C<\p{property:value}> (both of which mean the same thing).
57
58 Perl now fully supports the Unicode loose matching rules for text
59 between the braces in C<\p{...}> constructs.  In addition, Perl also allows
60 underscores between digits of numbers.
61
62 All the Unicode-defined synonyms for properties and property values are
63 now accepted.
64
65 C<qr/\X/>, which matches a Unicode logical character, has been expanded to work
66 better with various Asian languages.  It now is defined as an C<extended
67 grapheme cluster>.  (See L<http://www.unicode.org/reports/tr29/>).  One change
68 due to this is that C<\X> will match the whole sequence C<S<CR LF>>.  Another
69 change is that C<\X> will match an isolated mark.  Marks generally come after a
70 base character, but it is possible in Unicode to have them in isolation, and
71 C<\X> will now handle that case.  Otherwise, this change should be transparent
72 for non-affected languages.
73
74 C<\p{...}> matches using the Canonical_Combining_Class property were
75 completely broken in previous Perls.  This is now fixed.
76
77 In previous Perls, the Unicode Decomposition_Type=Compat property and a
78 Perl extension had the same name, which led to neither matching all the
79 correct values (with more than 100 mistakes in one, and several thousand
80 in the other).  The Perl extension has now been renamed to be
81 Decomposition_Type=Noncanonical (short: dt=noncanon).  It has the same
82 meaning as was previously intended, namely the union of all the
83 non-canonical Decomposition types, with Unicode Compat being just one of
84 those.
85
86 C<\p{Uppercase}> and C<\p{Lowercase}> have been brought into line with the
87 Unicode definitions.  This means they each match a few more characters
88 than previously.
89
90 C<\p{Cntrl}> now matches the same characters as C<\p{Control}>.  This means it
91 no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format
92 (gc=cf) code points.  The Format code points represent the biggest
93 possible problem.  All but 36 of them are either officially deprecated
94 or strongly discouraged from being used.  Of those 36, likely the most
95 widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and
96 similar, plus Bi-directional controls.
97
98 C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>.  The Perl
99 definition included a number of things that aren't really alpha (all
100 marks), while omitting many that were.  The Unicode definition is
101 clearly better, so we are switching to it.  As a direct consequence, the
102 definitions of C<\p{Alnum}> and C<\p{Word}> which depend on Alpha also change.
103
104 C<\p{Word}> also now doesn't match certain characters it wasn't supposed
105 to, such as fractions.
106
107 C<\p{Print}> no longer matches the line control characters: tab, lf, cr,
108 ff, vt, and nel.  This brings it in line with the documentation.
109
110 C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables
111
112 The Numeric type property has been extended to include the Unihan
113 characters.
114
115 There is a new Perl extension, the 'Present_In', or simply 'In'
116 property.  This is an extension of the Unicode Age property, but
117 C<\p{In=5.0}> matches any code point whose usage has been determined as of
118 Unicode version 5.0.  The C<\p{Age=5.0}> only matches code points added in 5.0.
119
120 A number of properties did not have the correct values for unassigned
121 code points.  This is now fixed.  The affected properties are
122 Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type,
123 Hangul_Syllable_Type, Numeric_Type, and Line_Break.
124
125 The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
126 have been updated to their current definitions.
127
128 Certain properties that are supposed to be Unicode internal-only were
129 erroneously exposed by previous Perls.  Use of these in regular
130 expressions will now generate a deprecated warning message, if those
131 warnings are enabled.  The properties are: Other_Alphabetic,
132 Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend,
133 Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and
134 Other_Uppercase.
135
136 An installation can now fairly easily change which Unicode properties
137 Perl understands.  As mentioned above, certain properties are by default
138 turned off.  These include all the Unihan properties (which should be
139 accessible via the CPAN module Unicode::Unihan) and any deprecated or
140 Unicode internal-only property that Perl has never exposed.
141
142 XXX what does "files in the To directory" mean? -- dagolden, 2009-12-20
143
144 The files in the To directory are now more clearly marked as being
145 stable, directly usable by applications.  New hash entries in them give
146 the format of the normal entries which allows for easier machine
147 parsing.  Perl can generate files in this directory for any property,
148 though most are suppressed.  An installation can choose to change which
149 get written.   Instructions are in L<perluniprops>.
150
151 =head1 New Platforms
152
153 XXX List any platforms that this version of perl compiles on, that previous
154 versions did not. These will either be enabled by new files in the F<hints/>
155 directories, or new subdirectories and F<README> files at the top level of the
156 source tree.
157
158 =head1 Modules and Pragmata
159
160 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
161 go here, in a list ordered by distribution name. Minimally it should be the
162 module version, but it's more useful to the end user to give a paragraph's
163 summary of the module's changes. In an ideal world, dual-life modules would
164 have a F<Changes> file that could be cribbed.
165
166 =head2 New Modules and Pragmata
167
168 =over 4
169
170 XXX
171
172 =back
173
174 =head2 Pragmata Changes
175
176 =over 4
177
178 =item C<constant>
179
180 Upgraded from version 1.19 to 1.20.
181
182 =item C<diagnostics>
183
184 This pragma no longer suppresses C<Use of uninitialized value in range (or flip)> warnings. [perl #71204]
185
186 =item C<feature>
187
188 Upgraded from 1.13 to 1.14.  Added the C<unicode_strings> feature:
189
190     use feature "unicode_strings";
191
192 This pragma turns on Unicode semantics for the case-changing operations
193 (uc/lc/ucfirst/lcfirst) on strings that don't have the internal UTF-8 flag set,
194 but that contain single-byte characters between 128 and 255.
195
196 =item C<legacy>
197
198 The experimental C<legacy> pragma, introduced in 5.11.2, has been removed,
199 and its functionality replaced by the new feature pragma, C<use feature
200 "unicode_strings">.
201
202 =item C<threads>
203
204 Upgraded from version 1.74 to 1.75.
205
206 =item C<warnings>
207
208 Upgraded from 1.07 to 1.08.  Added new C<warnings::fatal_enabled()> function.
209
210 =back
211
212 =head2 Updated Modules
213
214 XXX This should be generated with Porting/corelist-perldelta.pl once
215 Module::Corelist is updated for 5.011003.
216
217 =over 4
218
219 =item C<Archive::Extract>
220
221 Upgraded from version 0.34 to 0.36.
222
223 =item C<CPAN>
224
225 Upgraded from version 1.94_51 to 1.94_53.  Includes better bzip2 support,
226 improved FirstTime experience with auto-selection of CPAN mirrors, proper
227 handling of modules removed from the Perl core, and an updated 'cpan'
228 utility script
229
230 =item C<CPANPLUS>
231
232 Upgraded from version 0.89_09 to 0.90.
233
234 =item C<ExtUtils::MakeMaker>
235
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.
239
240 =item C<File::Path>
241
242 Upgraded from version 2.08 to 2.08_01.
243
244 =item C<Module::Build>
245
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.
251
252 =item C<Module::CoreList>
253
254 Upgraded from version 2.23 to 2.24.
255
256 =item C<POSIX>
257
258 Upgraded from version 1.18 to 1.19. Error codes for C<getaddrinfo()> and C<getnameinfo()> are now
259 available.
260
261 =item C<Pod::Simple>
262
263 Upgraded from version 3.10 to 3.13.
264
265 =item C<Safe>
266
267 Upgraded from version 2.19 to 2.20.
268
269 =back
270
271 =head1 Utility Changes
272
273 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
274 here. Most of these are built within the directories F<utils> and F<x2p>.
275
276 =over 4
277
278 =item F<perlbug>
279
280 No longer reports "Message sent" when it hasn't actually sent the message
281
282 =back
283
284 =head1 New Documentation
285
286 XXX Changes which create B<new> files in F<pod/> go here.
287
288 =over 4
289
290 =item L<XXX>
291
292 XXX
293
294 =back
295
296 =head1 Changes to Existing Documentation
297
298 XXX Changes which significantly change existing files in F<pod/> go here.
299 Any changes to F<pod/perldiag.pod> should go in L</New or Changed Diagnostics>.
300
301
302 The Pod specification (L<perlpodspec>) has been updated to bring the
303 specification in line with modern usage already supported by most Pod systems.
304 A parameter string may now follow the format name in a "begin/end" region.
305 Links to URIs with a text description are now allowed.  The usage of
306 C<LE<lt>"section"E<gt>> has been marked as deprecated.
307
308 L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
309 conditional loading of modules despite the implicit BEGIN block around C<use>.
310
311
312
313 =head1 Performance Enhancements
314
315 XXX Changes which enhance performance without changing behaviour go here. There
316 may well be none in a stable release.
317
318 =over 4
319
320 =item *
321
322 XXX
323
324 =back
325
326 =head1 Installation and Configuration Improvements
327
328 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
329 go here.
330
331 =head2 Configuration improvements
332
333 XXX
334
335 =head2 Compilation improvements
336
337     Make distclean work again
338 XXX
339
340 =head2 Testing improvements
341
342 =over 4
343
344 =item It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
345
346 =back
347
348 =head2 Platform Specific Changes
349
350 =over 4
351
352 =item Win32
353
354 =over 4
355
356 =item *
357
358 Always add a manifest resource to C<perl.exe> to specify the <trustInfo>
359 settings for Windows Vista and later.  Without this setting Windows
360 will treat C<perl.exe> as a legacy application and apply various
361 heuristics like redirecting access to protected file system areas
362 (like the "Program Files" folder) to the users "VirtualStore"
363 instead of generating a proper "permission denied" error.
364
365 For VC8 and VC9 this manifest setting is automatically generated by
366 the compiler/linker (together with the binding information for their
367 respective runtime libraries); for all other compilers we need to
368 embed the manifest resource explicitly in the external resource file.
369
370 This change also requests the Microsoft Common-Controls version 6.0
371 (themed controls introduced in Windows XP) via the dependency list
372 in the assembly manifest.  For VC8 and VC9 this is specified using the
373 C</manifestdependency> linker commandline option instead.
374
375 =back
376
377 =item cygwin
378
379 =over 4
380
381 =item Enable IPv6 support on cygwin 1.7 and newer
382
383 =back
384
385 =item OpenVMS
386
387 =over 4
388
389 =item Make -UDEBUGGING the default on VMS for 5.12.0.
390
391 Like it has been everywhere else for ages and ages.  Also make
392 command-line selection of -UDEBUGGING and -DDEBUGGING work in
393 configure.com; before the only way to turn it off was by saying
394 no in answer to the interactive question.
395
396 =back
397
398 =back
399
400 =head1 Selected Bug Fixes
401
402 XXX Important bug fixes in the core language are summarised here.
403 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
404 L</Modules and Pragmata>.
405
406 =over 4
407
408 =item *
409
410 Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852.
411
412 Instead of returning a(nother) reference to the (pre-compiled) regexp in the
413 optree, use reg_temp_copy() to create a copy of it, and return a reference to
414 that. This resolves issues about Regexp::DESTROY not being called in a timely
415 fashion (the original bug tracked by RT #69852), as well as bugs related to
416 blessing regexps, and of assigning to regexps, as described in correspondence
417 added to the ticket.
418
419 It transpires that we also need to undo the SvPVX() sharing when ithreads
420 cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned
421 copy of the mother_re. This change might fix bugs with regexps and threads in
422 certain other situations, but as yet neither tests nor bug reports have
423 indicated any problems, so it might not actually be an edge case that it's
424 possible to reach.
425
426 =item  *
427
428 Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed.
429
430 =item *
431
432 Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
433
434 =item *
435
436 F<-t> should only return TRUE for file handles connected to a TTY
437
438 The Microsoft C version of isatty() returns TRUE for all
439 character mode devices, including the /dev/null style "nul"
440 device and printers like "lpt1".
441
442 =item *
443
444 Fixed a regression caused by commit fafafbaf which caused a panic during parameter passing [perl #70171]
445
446
447 =item *
448
449 On systems which in-place edits without backup files, -i'*' now works as the documentation says it does [perl #70802]
450
451 =item *
452
453 Numerous bugfixes catch small issues caused by the recently-added Lexer API.
454
455 =item *
456
457 Smart match against C<@_> sometimes gave false negatives negatives. [perl #71078]
458
459 =item *
460
461 C<$@> may now be assigned a read-only value (without error or busting the stack).
462
463 =back
464
465 =head1 New or Changed Diagnostics
466
467 XXX New or changed warnings emitted by the core's C<C> code go here.
468
469 =over 4
470
471 =item C<XXX>
472
473     Make split warn in void context
474 XXX
475
476 =back
477
478 =head1 Changed Internals
479
480 XXX Changes which affect the interface available to C<XS> code go here.
481
482 =over 4
483
484 =item *
485
486 XXX
487
488 =back
489
490 =head1 New Tests
491
492 Many modules updated from CPAN incorporate new tests.
493
494 =over 4
495
496 =item t/comp/final_line_num.t
497
498 See if line numbers are correct at EOF
499
500 =item t/comp/form_scope.t
501
502 See if format scoping works
503
504 =item t/comp/line_debug.t
505
506 See if @{"_<$file"} works
507
508 =item t/op/filetest_t.t
509
510 See if -t file test works
511
512 =item t/op/qr.t
513
514 See if qr works
515
516 =item t/op/utf8cache.t
517
518 Tests malfunctions of utf8 cache
519
520 =item t/re/uniprops.t
521
522 Test unicode \p{} regex constructs
523
524 =back
525
526 =head1 Known Problems
527
528 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
529 tests that had to be C<TODO>ed for the release would be noted here, unless
530 they were specific to a particular platform (see below).
531
532 This is a list of some significant unfixed bugs, which are regressions
533 from either 5.11.3 or 5.11.3.
534
535 =over 4
536
537 =item *
538
539 XXX
540
541 =back
542
543 =head1 Deprecations
544
545 XXX Add any new known deprecations here.
546
547 The following items are now deprecated.
548
549 =over 4
550
551 =item Use of "goto" to jump into a construct is deprecated
552
553 Using C<goto> to jump from an outer scope into an inner
554 scope is now deprecated. This rare use case was causing
555 problems in the implementation of scopes.
556
557 =back
558
559 =head1 Platform Specific Notes
560
561 XXX Any changes specific to a particular platform. VMS and Win32 are the usual
562 stars here. It's probably best to group changes under the same section layout
563 as the main perldelta
564
565 =head1 Obituary
566
567 XXX If any significant core contributor has died, we've added a short obituary
568 here.
569
570 =head1 Acknowledgements
571
572 XXX The list of people to thank goes here.
573
574
575 =head1 Reporting Bugs
576
577 If you find what you think is a bug, you might check the articles
578 recently posted to the comp.lang.perl.misc newsgroup and the perl
579 bug database at http://rt.perl.org/perlbug/ .  There may also be
580 information at http://www.perl.org/ , the Perl Home Page.
581
582 If you believe you have an unreported bug, please run the B<perlbug>
583 program included with your release.  Be sure to trim your bug down
584 to a tiny but sufficient test case.  Your bug report, along with the
585 output of C<perl -V>, will be sent off to perlbug@perl.org to be
586 analysed by the Perl porting team.
587
588 If the bug you are reporting has security implications, which make it
589 inappropriate to send to a publicly archived mailing list, then please send
590 it to perl5-security-report@perl.org. This points to a closed subscription
591 unarchived mailing list, which includes all the core committers, who be able
592 to help assess the impact of issues, figure out a resolution, and help
593 co-ordinate the release of patches to mitigate or fix the problem across all
594 platforms on which Perl is supported. Please only use this address for
595 security issues in the Perl core, not for modules independently
596 distributed on CPAN.
597
598 =head1 SEE ALSO
599
600 The F<Changes> file for an explanation of how to view exhaustive details
601 on what changed.
602
603 The F<INSTALL> file for how to build Perl.
604
605 The F<README> file for general stuff.
606
607 The F<Artistic> and F<Copying> files for copyright information.
608
609 =cut
610
611
612
613
614 All changes through commit b4178430270dbe109e7609d0b50d6d54bf9e95d8
615 One "triage" pass done.
616
617 A second triage pass is still needed to remove unimportant changes
618
619 commit 9307c420fad2f6f5bd314f9ed66dd53288703e09
620 Author: Jan Dubois <jand@activestate.com>
621 Date:   Thu Dec 17 18:28:16 2009 -0800
622
623     Export PL_curinterp symbol for MULTIPLICITY without USE_ITHREADS
624
625     This is necessary for XS extensions that define PERL_CORE.  In that
626     situation PERL_GET_CONTEXT will resolve to PL_curinterp, which is
627     normally not exported (extensions call Perl_Gcurinterp_ptr() to get a
628     pointer to PL_curinterp instead). With USE_ITHREADS defined
629     PERL_GET_CONTEXT will expand to Perl_get_context() even inside the
630     core because the context needs to be fetched from threadlocal storage.
631
632 commit 2ab54efd6265713df5cd4bd0927024245675c1c2
633
634     fix bug 67156: overload: nomethod(..., '!') return value inverted
635
636 commit 69dc4b30f4725ad5f212d45d3c856ac1caaacf17
637 Author: Father Chrysostomos <sprout@cpan.org>
638 Date:   Mon Dec 14 12:19:35 2009 +0100
639
640     [perl #70764] $' fails to initialized for pre-compiled regular expression matches
641
642     The match vars are associated with the regexp that last matched
643     successfully. In the case of $str =~ $qr or /$qr/, since the $qr could
644     be used in multiple scopes that need their own sets of match vars, the
645     $qr is cloned by Perl_reg_temp_copy as of change 30677/28d8d7f. This
646     happens in pp_regcomp before pp_match has stringified the LHS, hence the
647     bug. In short, /$gror/ is not equivalent to
648     ($which = !$which) ? /$gror/ : /$gror/, which is weird.
649
650
651
652     Document config_args limitations reported in [perl #70912]
653
654     proper error on "grep $x (1,2,3)". Solves [perl #37314]
655
656 commit 8a27a13e89107aaf68c0748b68ee71fbd86d774b
657
658     [perl #71076] sort with active sub (5.10 regression)
659
660     One of the tests in sort.t causes a bus error (or sometimes Ã¢\80\98Undefined
661     subroutine calledâ\80\99) if run multiple times. This is because sort
662     decreases the refcount of an active sub used as a comparison routine.
663
664 commit 69c3dccf5322a59cb855347c04712ba11b65328f
665
666
667
668     [perl #71000] Wrong variable name in warning ; Add a new warning "Missing argument in %s"
669
670     preserve readonly flag when saving and restoring magic flags
671
672 commit 576b33a19ccaf98d4dfe201d529c55c3747f0cb6
673
674     [rt.cpan.org #51574] Safe.pm sort {} bug accessing $a and $b with -Dusethreads
675
676 commit ee6ba15dedda3e88eb66891eaf387c00a4c0a2fb
677
678     Fix -DPERL_NO_UTF16_FILTER