This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta - Add missing =item directive
[perl5.git] / pod / perl5193delta.pod
CommitLineData
ba03bc34
SH
1=encoding utf8
2
3=head1 NAME
4
5perl5193delta - what is new for perl v5.19.3
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.19.2 release and the 5.19.3
10release.
11
12If you are upgrading from an earlier release such as 5.19.1, first read
13L<perl5192delta>, which describes differences between 5.19.1 and 5.19.2.
14
15=head1 Core Enhancements
16
17=head2 B<-F> now implies B<-a> and B<-a> implies B<-n>
18
19Previously B<-F> without B<-a> was a no-op, and B<-a> without B<-n> or B<-p>
20was a no-op, with this change, if you supply B<-F> then both B<-a> and B<-n>
21are implied and if you supply B<-a> then B<-n> is implied.
22
23You can still use B<-p> for its extra behaviour. [perl #116190]
24
25=head1 Security
26
27=head2 Avoid possible read of free()d memory during parsing
28
29It was possible that free()d memory could be read during parsing in the unusual
30circumstance of the Perl program ending with a heredoc and the last line of the
31file on disk having no terminating newline character. This has now been fixed.
32
33=head1 Performance Enhancements
34
35=over 4
36
37=item *
38
39A performance regression introduced in Perl 5.11.2 in non-Unicode
40case-insensitive pattern matching has been largely resolved. In particular,
41the disabled optimization is now restored for every ASCII-range character.
42[perl #107816]
43
44=back
45
46=head1 Modules and Pragmata
47
48=head2 Updated Modules and Pragmata
49
50=over 4
51
52=item *
53
54L<B> has been upgraded from version 1.44 to 1.45.
55
56Calling the C<GV> method on C<B::CV> objects created from a lexical sub would
57return nonsense, possibly crashing perl. C<GV> now returns C<undef> for
58lexical subs. [perl #118525]
59
60Added the C<NAME_HEK> method to return the name of a lexical sub.
61
62=item *
63
64L<bignum> has been upgraded from version 0.33 to 0.36.
65
66L<bigrat> wasn't correctly updating an internal variable when C<use>d with a
67C<lib> option.
68
69=item *
70
71L<Carp> has been upgraded from 1.30 to 1.31
72
73L<Carp> now handles objects with string overloads. It also allows objects to
74specify how they appear in the stack dump with a C<CARP_TRACE> method, and also
75allows the user to specify their own formatter for objects without
76C<CARP_TRACE> as well as other references. [perl #92446]
77
78=item *
79
80L<Compress::Raw::Bzip2> has been upgraded from 2.061 to 2.062.
81
82No changes have been made other than the version bump to keep in sync with
83other related modules.
84
85=item *
86
87L<Compress::Raw::Zlib> has been upgraded from 2.061 to 2.062.
88
89A minor typo has been fixed in the documentation.
90
91=item *
92
93L<Config::Perl::V> has been upgraded from version 0.18 to 0.19.
94
95The list of build options has been updated.
96
97=item *
98
99L<constant> has been upgraded from version 1.27 to 1.28.
100
101Note that list constants will be inlined and may be read-only in future Perl
102versions.
103
104=item *
105
106L<CPAN::Meta> has been upgraded from version 2.131560 to 2.132140.
107
108Some documentation typos have been fixed.
109
110=item *
111
112L<Data::Dumper> has been upgraded from version 2.147 to 2.148.
113
114The compatibility of the XS implementation with the pure perl version under
115C<Useqq> has been improved. [perl #118933]
116
117=item *
118
119L<DB> has been upgraded from 1.41 to 1.42.
120
121The Perl debugger no longer crashes with C<PERLDB_OPTS="noTTY frame=2">.
122
123=item *
124
125L<Devel::Peek> has been upgraded from version 1.12 to 1.13.
126
127C<SvREFCNT_inc> and C<SvREFCNT_dec> have been removed and C<SvREFCNT> will now
128work on non-scalars. [perl #117793]
129
130C<Dump> now checks its arguments at compile time. Both arguments are now
131evaluated in scalar context, with exceptions for @arrays and %hashes, allowing
132aggregates to be dumped directly. The first argument is evaluated in rvalue
133scalar context, allowing rvalue C<pos> and C<substr> to be dumped.
134
135C<fill_mstats> no longer crashes if its argument is not already a string.
136[perl #92260]
137
138=item *
139
140L<Devel::PPPort> has been upgraded from version 3.20 to 3.21.
141
142Numerous updates and bug fixes are incorporated. See the F<Changes> file for
143full details.
144
145=item *
146
147L<diagnostics> has been upgraded from version 1.31 to 1.32.
148
149Wrapped links are no longer truncated.
150
151=item *
152
153L<DynaLoader> has been upgraded from version 1.18 to 1.19.
154
155The $dl_dlext variable is now documented.
156
157=item *
158
159L<Encode> has been upgraded from version 2.51 to 2.52.
160
161Encoding "0" with MIME-Headers no longer gets a blank string.
162
163=item *
164
165L<English> has been upgraded from version 1.07 to 1.08.
166
167The documentation of a performance fix has been corrected.
168
169=item *
170
171L<Exporter> has been upgraded from version 5.68 to 5.69.
172
173L<Exporter> would ignore custom $SIG{__WARN__} handlers in C<Exporter::Heavy>.
174[perl #39739]
175
176=item *
177
178L<ExtUtils::MakeMaker> has been upgraded from 6.68 to 6.72.
179
180The C<dist> target now reports the file created, an infinite loop in
181C<clean_subdirs> has been fixed, an invisible interactive question is now
182avoided when rebuilding Makefile, issues with F</cygdrive> on Cygwin have been
183resolved, C<LD> and C<OPTIMIZE> are now used in recursive F<Makefile.PL>
184invocations, C<VERSION> and C<VERSION_FROM> now handle v-strings correctly, and
185control characters are now stripped from C<ABSTRACT>.
186
187=item *
188
189L<File::Spec> has been upgraded from 3.41 to 3.44.
190
191The module is now partly implemented in XS, for performance.
192
193=item *
194
195L<Getopt::Std> has been upgraded from version 1.09 to 1.10.
196
197Clarified documentation of what happens when a switch is expecting an argument
198but fails to be provided with one.
199
200=item *
201
202The IO-Compress module collection has been upgraded from 2.061 to 2.062.
203
204Some documentation typos have been fixed.
205
206=item *
207
208L<IPC::Cmd> has been upgraded from version 0.82 to 0.84.
209
210C<run_forked> has various fixes/improvements, L<Socket> is only used where
211needed and a regression introduced in 0.78 has been fixed.
212
213=item *
214
215L<IPC::Open3> has been upgraded from version 1.14 to 1.15.
216
217C<open3> would leak a zombie process if the child process I/O redirection or
218C<exec> failed. [perl #114722]
219
220=item *
221
222L<IPC::SysV> has been upgraded from version 2.03 to 2.04.
223
224$EXPORT_TAGS{all} has been added and a couple of typos have been fixed.
225
226=item *
227
228The libnet module collection has been upgraded from version 1.22 to 1.23.
229
230Numerous bug fixes and documentation improvements have been made. See the
231F<Changes> file for full details.
232
233=item *
234
235L<List::Util> has been upgraded from version 1.27 to 1.31.
236
237L<List::Util> now includes C<pairgrep>, C<pairmap>, C<pairs>, C<pairkeys>,
238C<pairvalues> and C<pairfirst> functions that operate on even-sized lists of
239pairs.
240
241=item *
242
243L<Module::Build> has been upgraded from 0.4005 to 0.4007.
244
245The test suite has been significantly sped up, Unicode man page support has
246been enhanced and hash argument parsing in subclasses has been fixed.
247
248=item *
249
250L<Module::CoreList> has been upgraded from 2.92 to 2.97.
251
252The list of Perl versions covered has been updated.
253
254=item *
255
256L<mro> has been upgraded from version 1.12 to 1.13.
257
258A minor typo has been fixed in the documentation.
259
260=item *
261
262L<parent> has been upgraded from version 0.225 to 0.226.
263
264Internal changes only have been made to the test suite.
265
266=item *
267
268L<PerlIO> has been upgraded from version 1.07 to 1.08.
269
270Although not a security vulnerability, it was possible to inject code via
271C<PerlIO-E<gt>import()>. This has now been fixed. [perl #119287]
272
273=item *
274
275L<Pod::Functions> has been upgraded from version 1.07 to 1.08.
276
277Internal changes only have been made to the test suite.
278
279=item *
280
281L<Socket> has been upgraded from version 2.010 to 2.011.
282
283Handle FreeBSD (or other platforms) returning shorter AF_UNIX sockaddr
284structures due to embedded sun_len. [cpan #86613]
285
286=item *
287
288L<Storable> has been upgraded from version 2.45 to 2.46.
289
290Avoid creating temporary objects for STORABLE_attach when they aren't required.
291[perl #118907]
292
293=item *
294
295L<Time::HiRes> has been upgraded from version 1.9725 to 1.9726.
296
297An C<lstat> function is now provided and various bugs have been fixed. See the
298F<Changes> file for full details.
299
300=item *
301
302L<Time::Piece> has been upgraded from version 1.21 to 1.22.
303
304A minor documentation encoding problem has been fixed.
305
306=item *
307
308L<utf8> has been upgraded from version 1.12 to 1.13.
309
310A minor clarification has been made in the documentation.
311
312=item *
313
314L<version> has been upgraded from version 0.9902 to 0.9903.
315
316Various installation, testing and documentation changes have been made.
317
318=back
319
320=head1 Documentation
321
322=head2 Changes to Existing Documentation
323
324=head3 L<perlfunc>
325
326=over 4
327
328=item *
329
330The documentation of C<ref> has been updated to recommend the use of
331C<blessed>, C<isa> and C<reftype> when dealing with references to blessed
332objects.
333
334=back
335
336=head3 L<perlguts>
337
338=over 4
339
340=item *
341
342The explanation of the use of the C<SVs_PADMY> and C<SVs_PADTMP> flags in
343determining whether an SV lives on a scratchpad has been clarified.
344
345=back
346
347=head3 L<perlopentut>
348
349=over 4
350
351=item *
352
353The C<open> tutorial has been completely rewritten by Tom Christiansen, and now
354focuses on covering only the basics, rather than providing a comprehensive
355reference to all things openable. This rewrite came as the result of a
356vigorous discussion on perl5-porters kicked off by a set of improvements
357written by Alexander Hartmaier to the existing L<perlopentut>. A "more than
358you ever wanted to know about C<open>" document may follow in subsequent
359versions of perl.
360
361=back
362
363=head3 L<perlre>
364
365=over 4
366
367=item *
368
369The C</r> modifier (for non-destructive substitution) is now documented. [perl
370#119151]
371
372=back
373
374=head3 L<perlsub>
375
376=over 4
377
378=item *
379
380The need to predeclare recursive functions with prototypes in order for the
381prototype to be honoured in the recursive call is now documented. [perl #2726]
382
383=back
384
385=head3 L<perlvar>
386
387=over 4
388
389=item *
390
391A new section explaining the performance issues of $`, $& and $', including
392workarounds and changes in different versions of Perl, has been added.
393
394=back
395
396=head3 L<perlxs>
397
398=over 4
399
400=item *
401
402Several problems in the C<MY_CXT> example have been fixed.
403
404=back
405
406=head1 Diagnostics
407
408The following additions or changes have been made to diagnostic output,
409including warnings and fatal error messages. For the complete list of
410diagnostic messages, see L<perldiag>.
411
412=head2 New Diagnostics
413
414=head3 New Errors
415
416=over 4
417
418=item *
419
420L<Magical list constants are not supported|perldiag/"Magical list constants are
421not supported">
422
423(F) You assigned a magical array to a stash element, and then tried to use the
424subroutine from the same slot. You are asking Perl to do something it cannot
425do, details subject to change between Perl versions.
426
427=back
428
429=head3 New Warnings
430
431=over 4
432
433=item *
434
435L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
436as 0 in increment (++)">
437
438(W numeric) The indicated string was fed as an argument to the C<++> operator
439which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
440See L<perlop/Auto-increment and Auto-decrement> for details.
441
442=item *
443
444L<Unexpected exit %u|perldiag/"Unexpected exit %u">
445
446(S) exit() was called or the script otherwise finished gracefully when
447C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.
448
449=item *
450
451L<Unexpected exit failure %u|perldiag/"Unexpected exit failure %u">
452
453(S) An uncaught die() was called when C<PERL_EXIT_WARN> was set in
454C<PL_exit_flags>.
455
456=back
457
458=head1 Testing
459
460=over 4
461
462=item *
463
464The behaviour of C<pos> on very large strings is now tested in the new test
465script F<t/bigmem/pos.t>.
466
467=item *
468
469The test script F<t/porting/ss_dup.t> has been created to test that ss_dup()
470handles all savestack items.
471
472=item *
473
474The new behaviour of B<-F> and B<-a> (see the L</Core Enhancements> section) is
475tested in the new test script F<t/run/switchF2.t>.
476
477=back
478
479=head1 Internal Changes
480
481=over 4
482
483=item *
484
485C<sv_pos_b2u_flags> has been added to the API. It is similar to C<sv_pos_b2u>,
486but supports long strings on 64-bit platforms.
487
488=item *
489
490C<PL_exit_flags> can now be used by perl embedders or other XS code to have
491perl C<warn> or C<abort> on an attempted exit. [perl #52000]
492
493=back
494
495=head1 Selected Bug Fixes
496
497=over 4
498
499=item *
500
501Autovivifying a subroutine stub via C<\&$glob> started causing crashes in Perl
5025.18.0 if the $glob was merely a copy of a real glob, i.e., a scalar that had
503had a glob assigned to it. This has been fixed. [perl #119051]
504
505=item *
506
507On 64-bit platforms C<pos> can now be set to a value higher than 2**31-1.
508[perl #72766]
509
510=item *
511
512Perl used to leak an implementation detail when it came to referencing the
513return values of certain operators. C<for ($a+$b) { warn \$_; warn \$_ }> used
514to display two different memory addresses, because the C<\> operator was
515copying the variable. Under threaded builds, it would also happen for
516constants (C<for(1) { ... }>). This has been fixed. [perl #21979, #78194,
517#89188, #109746, #114838, #115388]
518
519=item *
520
521The range operator C<..> was returning the same modifiable scalars with each
522call, unless it was the only thing in a C<foreach> loop header. This meant
523that changes to values within the list returned would be visible the next time
524the operator was executed. [perl #3105]
525
526=item *
527
528Constant folding and subroutine inlining no longer cause operations that would
529normally return new modifiable scalars to return read-only values instead.
530
531=item *
532
533Closures of the form C<sub () { $some_variable }> are no longer inlined,
534causing changes to the variable to be ignored by callers of the subroutine.
535[perl #79908]
536
537=item *
538
539Return values of certain operators such as C<ref> would sometimes be shared
540between recursive calls to the same subroutine, causing the inner call to
541modify the value returned by C<ref> in the outer call. This has been fixed.
542
543=item *
544
545C<__PACKAGE__> and constants returning a package name or hash key are now
546consistently read-only. In various previous Perl releases, they have become
547mutable under certain circumstances.
548
549=item *
550
551C</$qr/p> was broken in Perl 5.18.0; the C</p> flag was ignored. This has been
552fixed. [perl #118213]
553
554=item *
555
556Starting in Perl 5.18.0, a construct like C</[#](?{})/x> would have its C<#>
557incorrectly interpreted as a comment. The code block would be skipped,
558unparsed. This has been corrected.
559
560=item *
561
562Starting in Perl 5.001, a regular expression like C</[#$a]/x> or C</[#]$a/x>
563would have its C<#> incorrectly interpreted as a comment, so the variable would
564not interpolate. This has been corrected. [perl #45667]
565
566=item *
567
568On non-threaded builds, setting C<${"_E<lt>filename"}> to a reference or
569typeglob no longer causes C<__FILE__> and some error messages to produce a
570corrupt string, and no longer prevents C<#line> directives in string evals from
571providing the source lines to the debugger. Threaded builds were unaffected.
572
573=item *
574
575Enabling "used once" warnings no longer causes crashes on stash circularities
576created at compile time (C<*Foo::Bar::Foo:: = *Foo::>).
577
578=item *
579
580Undef constants used in hash keys (C<use constant u =E<gt> undef; $h{+u}>) no
581longer produce "uninitialized" warnings at compile time.
582
583=item *
584
585Modifying a substitution target inside the substitution replacement no longer
586causes crashes.
587
588=item *
589
590The first statement inside a string eval used to use the wrong pragma setting
591sometimes during constant folding. C<eval 'uc chr 0xe0'> would randomly choose
592between Unicode, byte, and locale semantics. This has been fixed.
593
594=item *
595
596The handling of return values of @INC filters (subroutines returned by
597subroutines in @INC) has been fixed in various ways. Previously tied variables
598were mishandled, and setting $_ to a reference or typeglob could result in
599crashes.
600
601=item *
602
603The C<SvPVbyte> XS function has been fixed to work with tied scalars returning
604something other than a string. It used to return utf8 in those cases where
605C<SvPV> would.
606
607=item *
608
609Perl 5.18.0 inadvertently made dereferenced regular expressions
610S<(C<${ qr// }>)> false as booleans. This has been fixed.
611
612=item *
613
614Perl 5.18.0 inadvertently made C<--> and C<++> crash on dereferenced regular
615expressions, and stopped C<++> from flattening vstrings.
616
617=item *
618
619C<bless> no longer dies with "Can't bless non-reference value" if its first
620argument is a tied reference.
621
622=item *
623
624C<reset> with an argument no longer skips copy-on-write scalars, regular
625expressions, typeglob copies, and vstrings. Also, when encountering those or
626read-only values, it no longer skips any array or hash with the same name.
627
628=item *
629
630C<reset> with an argument now skips scalars aliased to typeglobs
631(C<for $z (*foo) { reset "z" }>). Previously it would corrupt memory or crash.
632
633=item *
634
635C<ucfirst> and C<lcfirst> were not respecting the bytes pragma. This was a
636regression from Perl 5.12. [perl #117355]
637
638=item *
639
640The use of C<\G> in regular expressions, where it's not at the start of the
641pattern, is now slightly less buggy (although it is still somewhat
642problematic).
643
644=item *
645
646Where a regular expression included code blocks (C</(?{...})/>), and where the
647use of constant overloading triggered a re-compilation of the code block, the
648second compilation didn't see its outer lexical scope. This was a regression
649in Perl 5.18.0.
650
651=item *
652
653Changes to C<UNIVERSAL::DESTROY> now update DESTROY caches in all classes,
654instead of causing classes that have already had objects destroyed to continue
655using the old sub. This was a regression in Perl 5.18. [perl #114864]
656
657=item *
658
659All known false-positive occurrences of the deprecation warning "Useless use of
660'\'; doesn't escape metacharacter '%c'", added in Perl 5.18.0, have been
661removed. [perl #119101]
662
663=back
664
665=head1 Acknowledgements
666
667Perl 5.19.3 represents approximately 4 weeks of development since Perl 5.19.2
668and contains approximately 24,000 lines of changes across 710 files from 36
669authors.
670
671Perl continues to flourish into its third decade thanks to a vibrant community
672of users and developers. The following people are known to have contributed
673the improvements that became Perl 5.19.3:
674
675Alexander Voronov, Andy Dougherty, Aristotle Pagaltzis, Brendan Byrd, Chris
676'BinGOs' Williams, Colin Kuskie, Craig A. Berry, Daniel Dragan, Darin McBride,
677David Mitchell, Father Chrysostomos, H.Merijn Brand, James E Keenan, John
678Gardiner Myers, John Peacock, Karl Williamson, Lukas Mai, Marcus
679Holland-Moritz, Nathan Trapuzzano, Neil Bowers, Nicholas Clark, Peter Martini,
680Philip Boulain, Ricardo Signes, Sergey Alekseev, Shlomi Fish, Smylers, Steffen
681Müller, Steve Hay, Tom Christiansen, Tony Cook, Victor Efimov, Viktor Turskyi,
682Vladimir Timofeev, Yves Orton, Zefram.
683
684The list above is almost certainly incomplete as it is automatically generated
685from version control history. In particular, it does not include the names of
686the (very much appreciated) contributors who reported issues to the Perl bug
687tracker.
688
689Many of the changes included in this version originated in the CPAN modules
690included in Perl's core. We're grateful to the entire CPAN community for
691helping Perl to flourish.
692
693For a more complete list of all of Perl's historical contributors, please see
694the F<AUTHORS> file in the Perl source distribution.
695
696=head1 Reporting Bugs
697
698If you find what you think is a bug, you might check the articles recently
699posted to the comp.lang.perl.misc newsgroup and the perl bug database at
700http://rt.perl.org/perlbug/ . There may also be information at
701http://www.perl.org/ , the Perl Home Page.
702
703If you believe you have an unreported bug, please run the L<perlbug> program
704included with your release. Be sure to trim your bug down to a tiny but
705sufficient test case. Your bug report, along with the output of C<perl -V>,
706will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
707
708If the bug you are reporting has security implications, which make it
709inappropriate to send to a publicly archived mailing list, then please send it
710to perl5-security-report@perl.org. This points to a closed subscription
711unarchived mailing list, which includes all the core committers, who will be
712able to help assess the impact of issues, figure out a resolution, and help
713co-ordinate the release of patches to mitigate or fix the problem across all
714platforms on which Perl is supported. Please only use this address for
715security issues in the Perl core, not for modules independently distributed on
716CPAN.
717
718=head1 SEE ALSO
719
720The F<Changes> file for an explanation of how to view exhaustive details on
721what changed.
722
723The F<INSTALL> file for how to build Perl.
724
725The F<README> file for general stuff.
726
727The F<Artistic> and F<Copying> files for copyright information.
728
729=cut