This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for IO::Socket::IP version 0.27
[perl5.git] / pod / perl5196delta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perl5196delta - what is new for perl v5.19.6
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.19.5 release and the 5.19.6
10 release.
11
12 If you are upgrading from an earlier release such as 5.19.4, first read
13 L<perl5195delta>, which describes differences between 5.19.4 and 5.19.5.
14
15 =head1 Core Enhancements
16
17 =head2 $a and $b warnings exemption
18
19 The special variables $a and $b, used in C<sort>, are now exempt from "used
20 once" warnings, even where C<sort> is not used.  This makes it easier for
21 CPAN modules to provide functions using $a and $b for similar purposes.
22 [perl #120462]
23
24 =head1 Deprecations
25
26 =head2 Module removals
27
28 The following modules will be removed from the core distribution in a
29 future release, and will at that time need to be installed from CPAN.
30 Distributions on CPAN which require these modules will need to list them as
31 prerequisites.
32
33 The core versions of these modules will now issue C<"deprecated">-category
34 warnings to alert you to this fact.  To silence these deprecation warnings,
35 install the modules in question from CPAN.
36
37 Note that these are (with rare exceptions) fine modules that you are encouraged
38 to continue to use.  Their disinclusion from core primarily hinges on their
39 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
40 not usually on concerns over their design.
41
42 =over
43
44 =item L<Package::Constants>
45
46 =back
47
48 =head1 Performance Enhancements
49
50 =over 4
51
52 =item *
53
54 Constant hash key lookups (C<$hash{key}> as opposed to C<$hash{$key}>) have
55 long had the internal hash value computed at compile time, to speed up
56 lookup.  This optimisation has only now been applied to hash slices as
57 well.
58
59 =item *
60
61 Combined C<and> and C<or> operators in void context, like those
62 generated for C<< unless ($a && $b) >> and C<< if ($a || b) >> now
63 short circuit directly to the end of the statement. [perl #120128]
64
65 =back
66
67 =head1 Modules and Pragmata
68
69 =head2 Updated Modules and Pragmata
70
71 =over 4
72
73 =item *
74
75 L<Archive::Tar> has been upgraded from version 1.92 to 1.96.
76
77 =item *
78
79 L<AutoLoader> has been upgraded from version 5.73 to 5.74.
80
81 =item *
82
83 L<B> has been upgraded from version 1.46 to 1.47.
84
85 C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
86 chr 256 remains chr 256, instead of turning into "\xc4\x80".  This allows
87 L<B::Deparse> to deparse Unicode regular expression correctly.
88 [perl #120182]
89
90 C<< B::HV->ARRAY >> now preserves the UTF8 flag on returned hash keys.
91 [perl #120535]
92
93 =item *
94
95 L<B::Concise> has been upgraded from version 0.99 to 0.991.
96
97 B<-debug> output now includes C<op_other> pointers.
98
99 =item *
100
101 L<B::Deparse> has been upgraded from version 1.23 to 1.24.
102
103 C<s//\(3)/e> is now deparsed in a way that does not issue warnings when
104 parsed again.  [perl #119807]
105
106 C<glob(my $x)> is now deparsed correctly, rather than as C<< <my $x> >> or
107 similar.
108
109 C<CORE::glob> is now deparsed correctly with the CORE:: prefix when there
110 is a subroutine named "glob".
111
112 =item *
113
114 L<B::Debug> has been upgraded from version 1.18 to 1.19.
115
116 =item *
117
118 L<bignum> has been upgraded from version 0.36 to 0.37.
119
120 =item *
121
122 L<Compress::Raw::Bzip2> has been upgraded from version 2.062 to 2.063.
123
124 =item *
125
126 L<Compress::Raw::Zlib> has been upgraded from version 2.062 to 2.063.
127
128 =item *
129
130 L<constant> has been upgraded from version 1.28 to 1.29.
131
132 =item *
133
134 L<DB_File> has been upgraded from version 1.829 to 1.831.
135
136 =item *
137
138 L<ExtUtils::MakeMaker> has been upgraded from version 6.80 to 6.82.
139
140 =item *
141
142 L<HTTP::Tiny> has been upgraded from version 0.036 to 0.038.
143
144 =item *
145
146 L<IO> has been upgraded from version 1.29 to 1.30.
147
148 =item *
149
150 L<IO::Select> has been upgraded from version 1.21 to 1.22.
151
152 Removing a closed file handle from an IO::Select object now correctly
153 updates its internal state and returns the correct value.  [perl #75156]
154
155 =item *
156
157 L<Locale::Maketext> has been upgraded from version 1.24 to 1.25.
158
159 An issue with escaped backslashes if the literal is compiled as
160 function argument has been resolved.
161
162 =item *
163
164 L<IPC::Cmd> has been upgraded from version 0.84_01 to 0.90.
165
166 =item *
167
168 L<Module::Build> has been upgraded from version 0.4007 to 0.4202.
169
170 NOTE: L<Module::Build> is deprecated and may be removed from a future version of Perl.
171
172 =item *
173
174 L<Module::CoreList> has been upgraded from version 3.00 to 3.01.
175
176 The list of Perl versions covered has been updated.
177
178 =item *
179
180 L<Package::Constants> has been upgraded from version 0.02 to 0.04.
181
182 NOTE: L<Package::Constants> is deprecated and may be removed from a future version of Perl.
183
184 =item *
185
186 L<PerlIO::scalar> has been upgraded from version 0.17 to 0.18.
187
188 A bug fix in 0.17 caused references to be stringified as soon as a handle
189 to it was opened, even if it was opened only for reading.  It also croaked
190 on read-only references.  This has been fixed.  [perl #119529]
191
192 =item *
193
194 L<Socket> has been upgraded from version 2.012 to 2.013.
195
196 =item *
197
198 L<Term::Cap> has been upgraded from version 1.13 to 1.15.
199
200 =item *
201
202 L<Test::Harness> has been upgraded from version 3.29 to 3.30.
203
204 =item *
205
206 L<Test::Simple> has been upgraded from version 0.99 to 1.001002.
207
208 =item *
209
210 L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
211
212 It no longer prints C<$\> twice.  [perl #120202]
213
214 It no longer ignores the offset passed to C<syswrite>.
215
216 =item *
217
218 L<threads> has been upgraded from version 1.89 to 1.90.
219
220 =item *
221
222 L<threads::shared> has been upgraded from version 1.44 to 1.45.
223
224 =item *
225
226 L<Unicode::Collate> has been upgraded from version 0.99 to 1.02.
227
228 =back
229
230 =head1 Documentation
231
232 =head2 Changes to Existing Documentation
233
234 =over 4
235
236 =item *
237
238 L<perlhacktips> has been updated to include some more examples of C<gdb> usage.
239
240 =item *
241
242 L<perlfunc>:
243
244 C<each>, clarify hash "modify while iterating".
245
246 C<pack>, the documentation for verbatim tables has been clarified.
247
248 =item *
249
250 L<perlre>, the documentation for C</x> and C<(?# comment)> has been expanded and clarified.
251
252 =item *
253
254 L<perllexwarn>, a note has been added to users of C<FATAL> warnings of the risk of upgrades.
255
256 =back
257
258 =head1 Diagnostics
259
260 =head2 Changes to Existing Diagnostics
261
262 =over 4
263
264 =item *
265
266 L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
267
268 This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
269 be in scalar context at compile time.  Previously it was worded "Scalar
270 value %%s[%s] better written as $%s[%s]".
271
272 =item *
273
274 L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:
275
276 The description for this diagnostic has been extended to cover all cases where the warning may occur.
277 Issues with the positioning of the arrow indicator have also been resolved.
278
279 =back
280
281 =head1 Testing
282
283 =over 4
284
285 =item *
286
287 F<ext/File-Find/t/find.t> has been converted from manual C<print>
288 statements to Test::More functions.  Each test now has a description.
289 [perl #120503]
290
291 =back
292
293 =head1 Platform Support
294
295 =head2 New Platforms
296
297 =over 4
298
299 =item Synology
300
301 Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
302 cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
303 P1022 ppc - e500v2) not meant for workstations or development. These boxes
304 should build now. The basic problems are the non-standard location for tools.
305
306 =back
307
308 =head2 Platform-Specific Notes
309
310 =over 4
311
312 =item Windows
313
314 Support for building with Visual C++ 2013 has been added.  There are currently
315 two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
316 will hopefully be resolved soon.
317
318 Experimental support for building with Intel C++ Compiler has been added. Only
319 the nmake makefile (win32/Makefile) can be used. A "nmake test" will not pass
320 at this time due to "cpan/CGI/t/url.t".
321
322 =item WinCE
323
324 Perl can now be built in one shot with no user intervention on WinCE by running
325 C<nmake -f Makefile.ce all>.
326
327 Support for building with EVC (Embedded Visual C++) 4 has been restored.  Perl
328 can also be built using Smart Devices for Visual C++ 2005 or 2008.
329
330 =back
331
332 =head1 Internal Changes
333
334 =over 4
335
336 =item *
337
338 Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
339 compilers to emulate the aliasing of C<bool> to C<char> that perl does for
340 C89 compilers.  [perl #120314]
341
342 =back
343
344 =head1 Selected Bug Fixes
345
346 =over 4
347
348 =item *
349
350 Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
351 C<use integer>.  This has been fixed.  [perl #120288]
352
353 =item *
354
355 C<-a> at the start of a line (or a hyphen with any single letter that is
356 not a filetest operator) no longer produces an erroneous 'Use of "-a"
357 without parentheses is ambiguous' warning.  [perl #120288]
358
359 =item *
360
361 Lvalue context is now properly propagated into bare blocks and C<if> and
362 C<else> blocks in lvalue subroutines.  Previously, arrays and hashes would
363 sometimes incorrectly be flattened when returned in lvalue list context, or
364 "Bizarre copy" errors could occur.  [perl #119797]
365
366 =item *
367
368 Lvalue context is now propagated to the branches of C<||> and C<&&> (and
369 their alphabetic equivalents, C<or> and C<and>).  This means
370 C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
371 through $_.
372
373 =item *
374
375 C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
376 C<DB::DB> subs declared thereafter.
377
378 =item *
379
380 C<stat> and C<readline> remember the last handle used; the former
381 for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
382 C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
383 or C<readline> could cause that handle to be forgotten if the
384 handle were not opened yet.  This has been fixed.
385
386 =item *
387
388 Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
389 have been fixed.  [perl #54044]
390
391 =item *
392
393 Assigning another typeglob to C<*^R> no longer makes the regular expression
394 engine crash.
395
396 =item *
397
398 C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
399 rather than whichever array C<@DB::dbline> is aliased to.  [perl #119799]
400
401 =item *
402
403 Setting C<$!> to EACCESS before calling C<require> could affect
404 C<require>'s behaviour.  This has been fixed.
405
406 =item *
407
408 The "Can't use \1 to mean $1 in expression" warning message now only occurs
409 on the right-hand (replacement) part of a substitution.  Formerly it could
410 happen in code embedded in the left-hand side, or in any other quote-like
411 operator.
412
413 =item *
414
415 The C<\N> regular expression escape, when used without the curly braces (to
416 mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
417 under /x.  It had been this way since C<\N> to mean C<[^\n]> was introduced
418 in 5.12.0.
419
420 =item *
421
422 Blessing into a reference (C<bless $thisref, $thatref>) has long been
423 disallowed, but magical scalars for the second like C<$/> and those tied
424 were exempt.  They no longer are.  [perl #119809]
425
426 =item *
427
428 Blessing into a reference was accidentally allowed in 5.18 if the class
429 argument were a blessed reference with stale method caches (i.e., whose
430 class had had subs defined since the last method call).  They are
431 disallowed once more, as in 5.16.
432
433 =item *
434
435 An undefined lexical sub used as an inherited method no longer crashes.
436
437 =item *
438
439 C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
440 if a Class::FIELDS subroutine stub has been declared.
441
442 =item *
443
444 C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
445 field checking ("No such class field"; see L<fields>) but no longer are.
446
447 =item *
448
449 That compile-time field checking also applies now to the C<%$obj{'key'}>
450 syntax, added recently in Perl 5.19.4.
451
452 =item *
453
454 A nonexistent array element with a large index passed to a subroutine that
455 ties the array and then tries to access the element no longer results in a
456 crash.
457
458 =item *
459
460 Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
461 array indices crash when the current package is a tied array class.
462
463 =item *
464
465 Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
466 CORE::GLOBAL:: package no longer makes compilation of calls to the
467 corresponding functions crash.
468
469 =item *
470
471 Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
472 but has now been fixed.
473
474 =item *
475
476 When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
477 interpolation now happens, as is the case when there is no override.
478 Previously, the presence of an override would make these quote-like
479 operators act like C<q{}>, suppressing interpolation.  [perl #115330]
480
481 =item *
482
483 C<<<`...`> here-docs (with backticks as the delimiters) now call
484 C<readpipe> overrides.  [perl #119827]
485
486 =item *
487
488 The presence of a lexical sub named "CORE" no longer stops the CORE::
489 prefix from working.
490
491 =item *
492
493 C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
494
495 =item *
496
497 Undefining a glob that triggers a DESTROY method that undefines the same
498 glob is now safe.  It used to produce "Attempt to free unreferenced glob
499 pointer" warnings and leak memory.
500
501 =item *
502
503 If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
504 triggers a DESTROY method on the sub that is being redefined, and that
505 method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
506 is no longer left pointing to a freed scalar.  Now DESTROY is delayed until
507 the new subroutine has been installed.
508
509 =item *
510
511 C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
512 delimiter.  [perl #120463]
513
514 =item *
515
516 On Windows, perl no longer calls CloseHandle() on a socket handle.  This makes
517 debugging easier on Windows by removing certain irrelevant bad handle
518 exceptions.  It also fixes a race condition that made socket functions randomly
519 fail in a Perl process with multiple OS threads, and possible test failures in
520 F<dist/IO/t/cachepropagate-tcp.t>.  [perl #120091/118059]
521
522 =item *
523
524 Some cases of unterminated (?...) sequences in regular expressions (e.g.,
525 C</(?</>) have been fixed to produce the proper error message instead of
526 "panic: memory wrap".  Other cases (e.g., C</(?(/>) have yet to be fixed.
527
528 =item *
529
530 Strange vars like ties, overloads, or stringified refs (and in recent
531 perls, pure NOK vars) would generally do the wrong thing in formats
532 when the var is treated as a string and repeatedly chopped, as in
533 ^<<<~~ and similar. This has now been resolved.
534
535 =back
536
537 =head1 Known Problems
538
539 =over 4
540
541 =item *
542
543 C<do CORE()> used to call a sub named "CORE" and treat its return value as
544 a file name to execute.  A bug fix inadvertently caused it to be
545 interpreted as the deprecated "do-SUB" construct.  (Yes, C<do
546 I<bareword>()> is inconsistent.)  This will likely be changed back.
547
548 =back
549
550 =head1 Acknowledgements
551
552 Perl 5.19.6 represents approximately 4 weeks of development since Perl 5.19.5
553 and contains approximately 88,000 lines of changes across 630 files from 24
554 authors.
555
556 Perl continues to flourish into its third decade thanks to a vibrant community
557 of users and developers. The following people are known to have contributed the
558 improvements that became Perl 5.19.6:
559
560 Anno Siegel, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David
561 Mitchell, Father Chrysostomos, François Perrad, H.Merijn Brand, James E
562 Keenan, Jerry D. Hedden, Karen Etheridge, Karl Williamson, Kevin Falcone, Lukas
563 Mai, Marc Simpson, Matthew Horsfall, Peter Martini, Petr Písař, Reini Urban,
564 Steve Hay, Tom Hukins, Tony Cook, Victor Efimov, Yves Orton.
565
566 The list above is almost certainly incomplete as it is automatically generated
567 from version control history. In particular, it does not include the names of
568 the (very much appreciated) contributors who reported issues to the Perl bug
569 tracker.
570
571 Many of the changes included in this version originated in the CPAN modules
572 included in Perl's core. We're grateful to the entire CPAN community for
573 helping Perl to flourish.
574
575 For a more complete list of all of Perl's historical contributors, please see
576 the F<AUTHORS> file in the Perl source distribution.
577
578 =head1 Reporting Bugs
579
580 If you find what you think is a bug, you might check the articles recently
581 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
582 http://rt.perl.org/perlbug/ .  There may also be information at
583 http://www.perl.org/ , the Perl Home Page.
584
585 If you believe you have an unreported bug, please run the L<perlbug> program
586 included with your release.  Be sure to trim your bug down to a tiny but
587 sufficient test case.  Your bug report, along with the output of C<perl -V>,
588 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
589
590 If the bug you are reporting has security implications, which make it
591 inappropriate to send to a publicly archived mailing list, then please send it
592 to perl5-security-report@perl.org.  This points to a closed subscription
593 unarchived mailing list, which includes all the core committers, who will be
594 able to help assess the impact of issues, figure out a resolution, and help
595 co-ordinate the release of patches to mitigate or fix the problem across all
596 platforms on which Perl is supported.  Please only use this address for
597 security issues in the Perl core, not for modules independently distributed on
598 CPAN.
599
600 =head1 SEE ALSO
601
602 The F<Changes> file for an explanation of how to view exhaustive details on
603 what changed.
604
605 The F<INSTALL> file for how to build Perl.
606
607 The F<README> file for general stuff.
608
609 The F<Artistic> and F<Copying> files for copyright information.
610
611 =cut