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