This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5123delta: Improve description
[perl5.git] / pod / perl5133delta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perl5133delta - what is new for perl v5.13.3
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.13.3 release and
10 the 5.13.2 release.
11
12 If you are upgrading from an earlier release such as 5.13.1, first read
13 L<perl5132delta>, which describes differences between 5.13.1 and
14 5.13.2.
15
16 =head1 Core Enhancements
17
18 =head2 \o{...} for octals
19
20 There is a new escape sequence, C<"\o">, in double-quote-like contexts.
21 It must be followed by braces enclosing an octal number of at least one
22 digit.  It interpolates as the character with an ordinal value equal to
23 the octal number.  This construct allows large octal ordinals beyond the
24 current max of 0777 to be represented.  It also allows you to specify a
25 character in octal which can safely be concatenated with other regex
26 snippets and which won't be confused with being a backreference to
27 a regex capture group.  See L<perlre/Capture groups>.
28
29 =head2 C<\N{I<name>}> and C<charnames> enhancements
30
31 C<\N{}> and C<charnames::vianame> now know about the abbreviated
32 character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as
33 well as all the customary abbreviations for the C0 and C1 control
34 characters (such as ACK, BEL, CAN, etc.), as well as a few new variants
35 in common usage of some C1 full names.
36
37 In the past, it was ineffective to override one of Perl's abbreviations
38 with your own custom alias.  Now it works.
39
40 You can also create a custom alias directly to the ordinal of a
41 character, known by C<\N{...}>, C<charnames::vianame()>, and
42 C<charnames::viacode()>.  Previously, an alias had to be to an official
43 Unicode character name.  This made it impossible to create an alias for
44 a code point that had no name, such as the ones reserved for private
45 use.  So this change allows you to make more effective use of private
46 use characters.  Only if there is no official name will
47 C<charnames::viacode()> return your custom one.
48
49 See L<charnames> for details on all these changes.
50
51 =head2 Uppercase X/B allowed in hexadecimal/binary literals
52
53 Literals may now use either upper case C<0X...> or C<0B...> prefixes,
54 in addition to the already supported C<0x...> and C<0b...>
55 syntax. (RT#76296) (a674e8d, 333f87f)
56
57 C, Ruby, Python and PHP already supported this syntax, and it makes
58 Perl more internally consistent. A round-trip with C<eval sprintf
59 "%#X", 0x10> now returns C<16> in addition to C<eval sprintf "%#x",
60 0x10>, which worked before.
61
62 =head1 Incompatible Changes
63
64 =head2 \400 - \777
65
66 Use of C<\400> - C<\777> in regexes in certain circumstances has given
67 different, anomalous behavior than their use in all other
68 double-quote-like contexts.   Since 5.10.1, a deprecated warning message
69 has been raised when this happens.  Now, all double-quote-like contexts
70 have the same behavior, namely to be equivalent to C<\x{100}> -
71 C<\x{1FF}>, with no deprecation warning. Use of these values in the
72 command line option C<"-0"> retains the current meaning to slurp input
73 files whole; previously, this was documented only for C<"-0777">.  It is
74 recommended, however, because of various ambiguities, to use the new
75 C<\o{...}> construct to represent characters in octal.
76 (fa1639c..f6993e9).
77
78 =head1 Deprecations
79
80 =head2 Omitting a space between a regular expression and subsequent word
81
82 Omitting a space between a regex pattern or pattern modifiers and the
83 following word is deprecated. Deprecation for regular expression
84 I<matches> was added in Perl 5.13.2.  In this release, the deprecation
85 is extended to regular expression I<substitutions>. For example,
86 C<< s/foo/bar/sand $bar >> will still be parsed as
87 C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66)
88
89 =head2 Deprecation warning added for deprecated-in-core .pl libs
90
91 This is a mandatory warning, not obeying -X or lexical warning bits.
92 The warning is modelled on that supplied by deprecate.pm for
93 deprecated-in-core .pm libraries.  It points to the specific CPAN
94 distribution that contains the .pl libraries. The CPAN version, of
95 course, does not generate the warning. (0111154)
96
97 =head1 Performance Enhancements
98
99 There are several small optimizations to reduce CPU cache misses in various very
100 commonly used modules like C<warnings> and C<Carp> as well in accessing
101 file-handles for reading.
102
103 =head1 Modules and Pragmata
104
105 =head2 Updated Modules and Pragmata
106
107 =over 4
108
109 =item C<autodie>
110
111 Upgraded from version 2.06_01 to 2.10.
112
113 =item C<charnames>
114
115 Upgraded from version 1.08 to 1.10.
116
117 C<viacode()> is now significantly faster. (f3227b7)
118
119 =item C<lib>
120
121 Upgraded from version 0.62 to 0.63.
122
123 =item C<threads>
124
125 Upgraded from version 1.77_02 to 1.77_03.
126
127 =item C<threads::shared>
128
129 Upgraded from version 1.33_01 to 1.33_02.
130
131 =item C<warnings>
132
133 Upgraded from version 1.09 to 1.10.
134
135 Calling C<use warnings> without arguments is now significantly more efficient.
136 (8452af9)
137
138 =item C<Archive::Extract>
139
140 Upgraded from version 0.38 to 0.42.
141
142 Updates since 0.38 include: a safe print method that guards
143 Archive::Extract from changes to $\; a fix to the tests when run in core
144 perl; support for TZ files; and a modification for the lzma logic to favour
145 IO::Uncompress::Unlzma (d7f8799)
146
147 =item C<Archive::Tar>
148
149 Upgraded from version 1.54 to 1.64.
150
151 Important changes since 1.54 include: compatibility with busybox
152 implementations of tar; a fix so that C<write()> and C<create_archive()>
153 close only handles they opened; and a bug was fixed regarding the exit code
154 of extract_archive. (afabe0e)
155
156 =item C<Attribute::Handlers>
157
158 Upgraded from version 0.87 to 0.88.
159
160 =item C<Compress::Raw::Bzip2>
161
162 Upgraded from version 2.024 to 2.027.
163
164 =item C<Compress::Raw::Zlib>
165
166 Upgraded from version 2.024 to 2.027_01.
167
168 =item C<Compress::Zlib>
169
170 Upgraded from version 2.024 to 2.027.
171
172 =item C<CPANPLUS>
173
174 Upgraded from version 0.90 to 0.9007.
175
176 Fixed the shell test to skip if test is not being run under a terminal;
177 resolved the issue where a prereq on Config would not be recognised as a
178 core module. (d4e225a)
179
180 =item C<Digest::MD5>
181
182 Upgraded from version 2.39 to 2.40.
183
184 =item C<Digest::SHA>
185
186 Upgraded from version 5.47 to 5.48.
187
188 =item C<Exporter>
189
190 Upgraded from version 5.64_02 to 5.64_03.
191
192 Exporter no longer overrides C<$SIG{__WARN__}> (RT #74472) (9b86bb5)
193
194 =item C<ExtUtils::CBuilder>
195
196 Upgraded from version 0.27 to 0.2703.
197
198 =item C<ExtUtils::Manifest>
199
200 Upgraded from version 1.57 to 1.58.
201
202 =item C<ExtUtils::ParseXS>
203
204 Upgraded from version 2.2205 to 2.2206.
205
206 =item C<File::Copy>
207
208 Upgraded from version 2.19 to 2.20.
209
210 Skips suid tests on a nosuid partition.  These tests were being skipped on
211 OpenBSD, but nosuid partitions can exist on other systems too. Now it just
212 checks if it can create a suid directory, if not the tests are skipped.
213 Perl builds without errors in a nosuid /tmp with this patch.  (cae9400)
214
215 =item C<I18N::LangTags>
216
217 Upgraded from version 0.35 to 0.35_01.
218
219 =item C<IPC::Cmd>
220
221 Upgraded from version 0.58 to 0.60.
222
223 =item C<IPC::SysV>
224
225 Upgraded from version 2.01 to 2.03.
226
227 =item C<Locale::Maketext>
228
229 Upgraded from version 1.14 to 1.15.
230
231 Locale::Maketext guts have been merged back into the main module (87d86da)
232 and adds external cache support (ace47d6)
233
234 =item C<Module::Build>
235
236 Upgraded from version 0.3603 to 0.3607.
237
238 =item C<Module::CoreList>
239
240 Upgraded from version 2.34 to 2.36.
241
242 =item C<Module::Load>
243
244 Upgraded from version 0.16 to 0.18.
245
246 =item C<Term::ANSIColor>
247
248 Upgraded from version 2.02 to 3.00.
249
250 =item C<Test::Harness>
251
252 Upgraded from version 3.17 to 3.21.
253
254 The core update from Test-Harness 3.17 to 3.21 fixed some things, but
255 also L<introduced a known problem|/"Known Problems"> with argument
256 passing to non-Perl tests.
257
258 =item C<Time::HiRes>
259
260 Upgraded from version 1.9719 to 1.9721.
261
262 =item C<Time::Piece>
263
264 Upgraded from version 1.15_01 to 1.20_01.
265
266 =item C<Unicode::Collate>
267
268 Upgraded from version 0.52_01 to 0.53.
269
270 Includes Unicode Collation Algorithm 18 (74b94a7)
271
272 =item C<Unicode::Normalize>
273
274 Upgraded from version 1.03 to 1.06.
275
276 =back
277
278 =head1 Documentation
279
280 =head2 New Documentation
281
282 =head3 L<perl5121delta>
283
284 The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
285
286 =head2 Changes to Existing Documentation
287
288 =head3 General changes
289
290 =over
291
292 =item *
293
294 Octal character escapes in documentation now prefer a three-digit octal
295 escape or the new C<\o{...}> escape as they have more consistent behavior
296 in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
297
298 =item *
299
300 Documentation now standardizes on the term 'capture group' over 'buffer'
301 in regular expression documentation (c27a5cf)
302
303 =back
304
305 =head3 L<perlfunc>
306
307 =over
308
309 =item *
310
311 Added cautionary note about "no VERSION" (e0de7c2)
312
313 =item *
314
315 Added additional notes regarding srand when forking (d460397)
316
317 =back
318
319 =head3 L<perlop>
320
321 =over 4
322
323 =item *
324
325 Improved documentation of unusual character escapes (4068718, 9644846)
326
327 =item *
328
329 Clarified how hexadecimal escapes are interpreted, with particular
330 attention to the treatment of invalid characters (9644846)
331
332 =back
333
334 =head3 L<perlrun>
335
336 =over
337
338 =item *
339
340 Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
341
342 =back
343
344 =head3 L<perlpolicy>
345
346 =over
347
348 =item *
349
350 Added the policy on compatibility and deprecation along with definitions of
351 terms like "deprecation" (70e4a83)
352
353 =back
354
355 =head3 L<perlre>
356
357 =over
358
359 =item *
360
361 Added examples of the perils of not using \g{} when there are more
362 than nine back-references (9d86067)
363
364 =back
365
366 =head3 L<perltie>
367
368 =over
369
370 =item *
371
372 Updated some examples for modern Perl style (67d00dd)
373
374 =back
375
376 =head1 Utility Changes
377
378 =head3 L<perldb>
379
380 =over
381
382 =item *
383
384 The remote terminal works after forking and spawns new sessions - one
385 for each forked process (11653f7)
386
387 =item *
388
389 Uses the less pager path from Config instead of searching for it (bf320d6)
390
391 =back
392
393 =head1 Configuration and Compilation
394
395 =over 4
396
397 =item *
398
399 Adjusted 'make test.valgrind' to account for cpan/dist/ext separation
400 (e07ce2e)
401
402 =back
403
404 =head1 Testing
405
406 =over 4
407
408 =item *
409
410 F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
411
412 =item *
413
414 Many common testing routines were refactored into t/lib/common.pl
415
416 =item *
417
418 Several test files have been modernized to use Test::More
419
420 =back
421
422 =head1 Platform Support
423
424 =head2 Discontinued Platforms
425
426 =over 4
427
428 =item MacOS Classic
429
430 Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
431 December 2004.  Vestigial MacOS Classic specific code has now been removed
432 from other core modules as well (8f8c2a4..c457df0)
433
434 =back
435
436 =head2 Platform-Specific Notes
437
438 =over 4
439
440 =item Win32
441
442 t/io/openpid.t now uses the alarm() watchdog strategy for more
443 robustness (5732108)
444
445 =back
446
447 =head1 Internal Changes
448
449 =over 4
450
451 =item *
452
453 Under some circumstances, the C<CvGV()> field of a CV is now reference
454 counted. To ensure consistent behaviour, direct assignment to it, for
455 example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
456 C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
457 Note that modification of this field is not part of of the public API,
458 regardless of this new macro. This change caused some
459 L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
460 field.
461
462 =item *
463
464 It is now possible for XS code to hook into Perl's lexical scope
465 mechanism at compile time, using the new C<Perl_blockhook_register>
466 function. See L<perlguts/"Compile-time scope hooks">.
467
468 =item *
469
470 Added C<Perl_croak_no_modify()> to implement
471 C<Perl_croak("%s", PL_no_modify)> (6ad8f25)
472
473 =item *
474
475 Added prototypes for C<tie()> and C<untie()> to allow overloading (RT#75902)
476 (1db4d19)
477
478 =item *
479
480 Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>.  C<my_stat()> and
481 C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
482 variants that allow us to control this. (0d7d409)
483
484 =back
485
486 =head1 Selected Bug Fixes
487
488 =over 4
489
490 =item *
491
492 Some work has been done on the internal pointers that link between symbol
493 tables (stashes), typeglobs and subroutines. This has the effect that
494 various edge cases related to deleting stashes or stash entries (e.g.
495 <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
496 longer crash the interpreter.
497
498 =item *
499
500 Fixed readline() when interrupted by signals so it no longer returns
501 the "same thing" as before or random memory
502
503 =item *
504
505 Fixed a regression of kill() when a match variable is used for the
506 process ID to kill  (RT#75812) (8af710e)
507
508 =item *
509
510 Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
511 used for sorting (RT#72334) (8f443ca)
512
513 =item *
514
515 Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
516
517 =item *
518
519 Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
520
521 =item *
522
523 Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
524
525 =item *
526
527 Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12
528 (da8fb5d)
529
530 =item *
531
532 Avoids multiple FETCH/stringify on filetest ops (40c852d)
533
534 =item *
535
536 Fixed issue with string C<eval> not detecting taint of overloaded/tied
537 arguments (RT #75716) (895b760)
538
539 =item *
540
541 Fix potential crashes of string C<eval> when evaluating a object with
542 overloaded stringification by creating a stringified copy when necessary
543 (3e5c018)
544
545 =item *
546
547 Fixed bug where overloaded stringification could remove tainting
548 (RT #75716) (a02ec77)
549
550 =item *
551
552 Plugs more memory leaks in vms.c. (9e2bec0)
553
554 =item *
555
556 Fix pthread include error for Time::Piece (e9f284c)
557
558 =back
559
560 =head1 Known Problems
561
562 =over 4
563
564 =item *
565
566 Bug fixes involving CvGV reference counting break Sub::Name.  A
567 patch has been sent upstream to the maintainer
568
569 =item *
570
571 readline() returns an empty string instead of undef when it is
572 interrupted by a signal
573
574 =item *
575
576 Test-Harness was updated from 3.17 to 3.21 for this release. A rewrite
577 in how it handles non-Perl tests (in 3.17_01) broke argument passing to
578 non-Perl tests with L<prove> (RT #59186), and required that non-Perl
579 tests be run as C<prove ./test.sh> instead of C<prove test.sh> These
580 issues are being solved upstream, but didn't make it into this release.
581 They're expected to be fixed in time for perl v5.13.4.  (RT #59457)
582
583 =item *
584
585 C<version> now prevents object methods from being called as class methods
586 (d808b68)
587
588 =back
589
590 =head1 Errata
591
592 =over 4
593
594 =item *
595
596 Retroactively added the Acknowledgements list to L<perl5132delta>,
597 which was excluded in the original release (d1e2db0)
598
599 =back
600
601 =head1 Acknowledgements
602
603 Perl 5.13.3 represents approximately one month of development since Perl
604 5.13.2, and contains 12,184 lines of changes across 575 files from 104
605 authors and committers.
606
607 Thank you to the following for contributing to this release:
608
609 Abhijit Menon-Sen, Abigail, Alex Davies, Alex Vandiver, Alexandr
610 Ciornii, Andreas J. Koenig, Andrew Rodland, Andy Dougherty, Aristotle
611 Pagaltzis, Arkturuz, Ben Morrow, Bo Borgerson, Bo Lindbergh, Brad
612 Gilbert, Bram, Brian Phillips, Chas. Owens, Chip Salzenberg, Chris
613 Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, Daniel
614 Frederick Crisman, Dave Rolsky, David Caldwell, David E. Wheeler, David
615 Golden, David Leadbeater, David Mitchell, Dennis Kaarsemaker, Eric
616 Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene
617 Sullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham
618 Barr, H.Merijn Brand, Harmen, Hugo van der Sanden, James E Keenan, James
619 Mastros, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, John
620 Peacock, Jos Boumans, Josh ben Jore, Karl Williamson, Kevin Ryde, Leon
621 Brocard, Lubomir Rintel, Maik Hentsche, Marcus Holland-Moritz, Matt
622 Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael G Schwern,
623 Moritz Lenz, Nga Tang Chan, Nicholas Clark, Nick Cleaton, Nick Johnston,
624 Niko Tyni, Offer Kaye, Paul Marquess, Philip Hazel, Philippe Bruhat,
625 Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes,
626 Richard Soderberg, Robin Barker, Ruslan Zakirov, Salvador Fandino,
627 Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic,
628 Steffen Mueller, Stepan Kasal, Steve Hay, Steve Peters, Sullivan Beck,
629 Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook,
630 Vincent Pit, Yuval Kogman, Yves Orton, Zefram, brian d foy, chromatic,
631 kmx, Ævar Arnfjörð Bjarmason
632
633 =head1 Reporting Bugs
634
635 If you find what you think is a bug, you might check the articles
636 recently posted to the comp.lang.perl.misc newsgroup and the perl
637 bug database at http://rt.perl.org/perlbug/ .  There may also be
638 information at http://www.perl.org/ , the Perl Home Page.
639
640 If you believe you have an unreported bug, please run the B<perlbug>
641 program included with your release.  Be sure to trim your bug down
642 to a tiny but sufficient test case.  Your bug report, along with the
643 output of C<perl -V>, will be sent off to perlbug@perl.org to be
644 analysed by the Perl porting team.
645
646 If the bug you are reporting has security implications, which make it
647 inappropriate to send to a publicly archived mailing list, then please send
648 it to perl5-security-report@perl.org. This points to a closed subscription
649 unarchived mailing list, which includes all the core committers, who be able
650 to help assess the impact of issues, figure out a resolution, and help
651 co-ordinate the release of patches to mitigate or fix the problem across all
652 platforms on which Perl is supported. Please only use this address for
653 security issues in the Perl core, not for modules independently
654 distributed on CPAN.
655
656 =head1 SEE ALSO
657
658 The F<Changes> file for an explanation of how to view exhaustive details
659 on what changed.
660
661 The F<INSTALL> file for how to build Perl.
662
663 The F<README> file for general stuff.
664
665 The F<Artistic> and F<Copying> files for copyright information.
666
667 =cut