This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Initial work for pod/erldelta for 5.23.5
[perl5.git] / pod / perl5234delta.pod
CommitLineData
b6af474d
SH
1=encoding utf8
2
3=head1 NAME
4
5perl5234delta - what is new for perl v5.23.4
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.23.3 release and the 5.23.4
10release.
11
12If you are upgrading from an earlier release such as 5.23.2, first read
13L<perl5233delta>, which describes differences between 5.23.2 and 5.23.3.
14
15=head1 Incompatible Changes
16
17=head2 Lexical $_ has been removed
18
19C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion
20with no obvious solution. In Perl 5.18.0, it was made experimental on the
21theory that it would either be removed or redesigned in a less confusing (but
22backward-incompatible) way. Over the following years, no alternatives were
23proposed. The feature has now been removed and will fail to compile.
24
25=head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>.
26
27The experimental Extended Bracketed Character Classes can contain regular
28bracketed character classes within them. These differ from regular ones in
29that white space is generally ignored, unless escaped by preceding it with a
30backslash. The white space that is ignored is now limited to just tab C<\t>
31and SPACE characters. Previously, it was any white space. See
32L<perlrecharclass/Extended Bracketed Character Classes>.
33
34=head1 Performance Enhancements
35
36=over 4
37
38=item *
39
40C</fixed-substr/> has been made much faster.
41
42On platforms with a libc memchr() implementation which makes good use of
43underlying hardware support, patterns which include fixed substrings will now
44often be much faster; for example with glibc on a recent x86_64 CPU, this:
45
46 $s = "a" x 1000 . "wxyz";
47 $s =~ /wxyz/ for 1..30000
48
49is now about 7 times faster. On systems with slow memchr(), e.g. 32-bit ARM
50Raspberry Pi, there will be a small or little speedup. Conversely, some
51pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3
52times slower on the rPi, 1.5x slower on x86_64.
53
54=back
55
56=head1 Modules and Pragmata
57
58=head2 Updated Modules and Pragmata
59
60=over 4
61
62=item *
63
64L<B> has been upgraded from version 1.59 to 1.60.
65
66=item *
67
68L<bignum> has been upgraded from version 0.40 to 0.41.
69
70=item *
71
72L<Compress::Raw::Bzip2> has been upgraded from version 2.068 to 2.069.
73
74=item *
75
76L<Compress::Raw::Zlib> has been upgraded from version 2.068_01 to 2.069.
77
78=item *
79
80L<Devel::PPPort> has been upgraded from version 3.31 to 3.32.
81
82=item *
83
84L<DynaLoader> has been upgraded from version 1.34 to 1.35.
85
86=item *
87
88L<Encode> has been upgraded from version 2.77 to 2.78.
89
90=item *
91
92L<experimental> has been upgraded from version 0.014 to 0.016.
93
94=item *
95
96L<ExtUtils::CBuilder> has been upgraded from version 0.280223 to 0.280224.
97
98=item *
99
100L<File::Path> has been upgraded from version 2.11 to 2.12.
101
102=item *
103
104L<if> has been upgraded from version 0.0605 to 0.0606.
105
106=item *
107
108L<IO> has been upgraded from version 1.35 to 1.36.
109
110For an IO::Poll object C<$poll> with no file handles yet in it,
111C<$poll-E<gt>poll(10)> now sleeps for up to 10 seconds anyway instead of
112returning 0 immediately.
113L<[cpan #25049]|https://rt.cpan.org/Ticket/Display.html?id=25049>
114
115=item *
116
117The IO-Compress modules have been upgraded from version 2.068 to 2.069.
118
119=item *
120
121L<Math::BigInt> has been upgraded from version 1.999701 to 1.999704.
122
123=item *
124
125L<Math::BigInt::FastCalc> has been upgraded from version 0.31 to 0.34.
126
127=item *
128
129L<Module::CoreList> has been upgraded from version 5.20150920 to 5.20151020.
130
131=item *
132
133L<Module::Metadata> has been upgraded from version 1.000027 to 1.000029.
134
135=item *
136
137L<Perl::OSType> has been upgraded from version 1.008 to 1.009.
138
139=item *
140
141L<PerlIO::encoding> has been upgraded from version 0.21 to 0.22.
142
143PerlIO::encoding objects are now properly duplicated.
144L<[perl #31923]|https://rt.perl.org/Ticket/Display.html?id=31923>
145
146=item *
147
148L<POSIX> has been upgraded from version 1.57 to 1.58.
149
150If C<POSIX::strerror> was passed C<$!> as its argument then it accidentally
151cleared C<$!>. This has been fixed.
152L<[perl #126229]|https://rt.perl.org/Ticket/Display.html?id=126229>
153
154=item *
155
156L<Socket> has been upgraded from version 2.020_01 to 2.020_02.
157
158Various fixes have been applied to inet_pton for the benefit of MS VC++ builds
159on Windows. In particular, this restores the build with MS VC++ 6.0.
160
161=item *
162
163L<Unicode::Normalize> has been upgraded from version 1.19 to 1.21.
164
165=item *
166
167L<warnings> has been upgraded from version 1.33 to 1.35.
168
169The C<warnings::enabled> example now actually uses C<warnings::enabled>.
170L<[perl #126051]|https://rt.perl.org/Ticket/Display.html?id=126051>
171
172=back
173
174=head1 Documentation
175
176=head2 Changes to Existing Documentation
177
178=head3 L<perlapi>
179
180=over 4
181
182=item *
183
184The process of using undocumented globals has been documented, namely, that one
185should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>
186first to get the go-ahead for documenting and using an undocumented function or
187global variable.
188
189=back
190
191=head3 L<perlsub>
192
193=over 4
194
195=item *
196
197Updated to note that anonymous subroutines can have signatures.
198
199=back
200
201=head3 L<perltie>
202
203=over 4
204
205=item *
206
207The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified.
208
209=back
210
211=head3 L<perlvar>
212
213=over 4
214
215=item *
216
217The specific true value of C<$!{E...}> is now documented, noting that it is
218subject to change and not guaranteed.
219
220=back
221
222=head1 Diagnostics
223
224The following additions or changes have been made to diagnostic output,
225including warnings and fatal error messages. For the complete list of
226diagnostic messages, see L<perldiag>.
227
228=head2 New Diagnostics
229
230=head3 New Errors
231
232=over 4
233
234=item *
235
236L<Can't find Unicode property definition "%s" in regex;|perldiag/"Can't find Unicode property definition "%s" in regex; marked by <-- HERE in m/%s/">
237
238=item *
239
240L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/">
241
242=item *
243
244L<Illegal user-defined property name|perldiag/"Illegal user-defined property name">
245
246=back
247
248=head2 Changes to Existing Diagnostics
249
250=over 4
251
252=item *
253
254L<Can't modify non-lvalue subroutine call of &%s|perldiag/"Can't modify non-lvalue subroutine call of &%s">
255
256This error now reports the name of the non-lvalue subroutine you attempted to
257use as an lvalue.
258
259=back
260
261=head1 Configuration and Compilation
262
263=over 4
264
265=item *
266
267Using the C<NO_HASH_SEED> define in combination with the default hash algorithm
268C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling
269the interpreter, since Perl 5.17.10. This has been fixed.
270
271=item *
272
273If you had F<Configure> hints for C<d_procselfexe> or C<procselfexe>, they were
274probably broken by the AmigaOS changes in Perl 5.23.3. This has been now
275fixed.
276L<[perl #126152]|https://rt.perl.org/Ticket/Display.html?id=126152>
277
278=back
279
280=head1 Platform Support
281
282=head2 Platform-Specific Notes
283
284=over 4
285
286=item IRIX
287
288=over
289
290=item *
291
292Under some circumstances IRIX stdio fgetc() and fread() set the errno to
293C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno
294is now cleared in such cases.
295L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977>
296
297=item *
298
299Problems when multiplying long doubles by infinity have been fixed.
300L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396>
301
302=back
303
304=item MacOS X
305
306=over
307
308=item *
309
310Until now OS X builds of perl have specified a link target of 10.3 (Panther,
3112003) but have not specified a compiler target. From now on, builds of perl on
312OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X
313version and specify that as the explicit build target in both compiler and
314linker flags, thus preserving binary compatibility for extensions built later
315regardless of changes in OS X, SDK, or compiler and linker versions. To
316override the default value used in the build and preserved in the flags,
317specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building
318perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or
319earlier there is no change to the behavior present when those systems were
320current; the link target is still OS X 10.3 and there is no explicit compiler
321target.
322
323=back
324
325=item VMS
326
327=over
328
329=item *
330
331Perl now implements its own C<killpg> by scanning for processes in the
332specified process group, which may not mean exactly the same thing as a Unix
333process group, but allows us to send a signal to a parent (or master) process
334and all of its sub-processes. At the perl level, this means we can now send a
335negative pid like so:
336
337 kill SIGKILL, -$pid;
338
339to signal all processes in the same group as C<$pid>.
340
341=back
342
343=item Win32
344
345=over
346
347=item *
348
349A new build option C<USE_NO_REGISTRY> has been added to the makefiles. This
350option is off by default, meaning the default is to do Windows registry
351lookups. This option stops Perl from looking inside the registry for anything.
352For what values are looked up in the registry see L<perlwin32>. Internally, in
353C, the name of this option is C<WIN32_NO_REGISTRY>.
354
355=item *
356
357The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and
358C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV>
359vars starting with C<PERL> has changed. Previously, the 2 keys were checked
360for entries at all times through Perl processes life time even if they did not
361exist. For performance reasons, now, if the root key (i.e.
362C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does
363not exist at process start time, it will not be checked again for C<%ENV>
364override entries for the remainder of the Perl processes life. This more
365closely matches Unix behaviour in that the environment is copied or inherited
366on startup and changing the variable in the parent process or another process
367or editing F<.bashrc> will not change the environmental variable in other
368existing, running, processes.
369
370=item *
371
372One glob fetch was removed for each C<-X> or C<stat> call whether done from
373Perl code or internally from Perl's C code. The glob being looked up was
374C<${^WIN32_SLOPPY_STAT}> which is a special variable. This makes C<-X> and
375C<stat> slightly faster.
376
377=item *
378
379During miniperl's process startup, during the build process, 4 to 8 IO calls
380related to the process starting F<.pl> and the F<buildcustomize.pl> file were
381removed from the code opening and executing the first 1 or 2 F<.pl> files.
382
383=back
384
385=back
386
387=head1 Internal Changes
388
389=over 4
390
391=item *
392
393L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>. It
394previously has always returned C<0> since Perl 5.000 stable but that was
395undocumented. Although C<sv_backoff> is marked as public API, XS code is not
396expected to be impacted since the proper API call would be through public API
397C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public
398C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a
399meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>.
400
401=item *
402
403The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues
404with integer truncation and wrapping. In particular, some casts formerly used
405within the macros have been removed. This means for example that passing an
406unsigned nitems argument is likely to raise a compiler warning now (it's always
407been documented to require a signed value; formerly int, lately SSize_t).
408
409=back
410
411=head1 Selected Bug Fixes
412
413=over 4
414
415=item *
416
417There were places in regular expression patterns where comments (C<(?#...)>)
418weren't allowed, but should have been. This is now fixed.
419L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639>
420
421=item *
422
423Some regressions from Perl 5.20 have been fixed, in which some syntax errors in
424L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs
425within regular expression patterns could cause a segfault instead of a proper
426error message.
427L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180>
428L<[perl #126404]|https://rt.perl.org/Ticket/Display.html?id=126404>
429
430=item *
431
432Another problem with
433L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes>
434constructs has been fixed wherein things like C<\c]> could cause panics.
435L<[perl #126181]|https://rt.perl.org/Ticket/Display.html?id=126181>
436
437=item *
438
439Some problems with attempting to extend the perl stack to around 2G or 4G
440entries have been fixed. This was particularly an issue on 32-bit perls built
441to use 64-bit integers, and was easily noticeable with the list repetition
442operator, e.g.
443
444 @a = (1) x $big_number
445
446Formerly perl may have crashed, depending on the exact value of C<$big_number>;
447now it will typically raise an exception.
448L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937>
449
450=item *
451
452In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if
453the condition is C<(?!)> then perl failed the match outright instead of
454matching the no-pattern. This has been fixed.
455L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222>
456
457=item *
458
459The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional
460argument and set C<REGERROR>/C<REGMARK> appropriately as well.
461L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186>
462
463=item *
464
465Several bugs, including a segmentation fault, have been fixed with the bounds
466checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>,
467C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>. All the C<\B{}> ones now match an empty
468string; none of the C<\b{}> ones do.
469L<[perl #126319]|https://rt.perl.org/Ticket/Display.html?id=126319>
470
471=back
472
473=head1 Errata From Previous Releases
474
475=over 4
476
477=item *
478
479(This was actually done in Perl 5.23.2, but the perldelta entry got missed.)
480The way that C<OP_AASSIGN> handles assignment with potentially common values
481(e.g. C<($a,$b) = ($b, $a)> has changed. In particular the C<OPpASSIGN_COMMON>
482flag has been replaced with three more specific flags:
483
484 OPpASSIGN_COMMON_AGG
485 OPpASSIGN_COMMON_RC1
486 OPpASSIGN_COMMON_SCALAR
487
488and the runtime now sometimes does a mark and sweep using the C<SVf_BREAK> to
489detect common elements.
490
491=back
492
493=head1 Acknowledgements
494
495Perl 5.23.4 represents approximately 4 weeks of development since Perl 5.23.3
496and contains approximately 21,000 lines of changes across 360 files from 21
497authors.
498
499Excluding auto-generated files, documentation and release tools, there were
500approximately 15,000 lines of changes to 250 .pm, .t, .c and .h files.
501
502Perl continues to flourish into its third decade thanks to a vibrant community
503of users and developers. The following people are known to have contributed
504the improvements that became Perl 5.23.4:
505
506Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel
507Dragan, David Mitchell, Doug Bell, Father Chrysostomos, H.Merijn Brand, Jarkko
508Hietaniemi, Karen Etheridge, Karl Williamson, Nicholas Clark, Peter Martini,
509Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Steve Hay, Tony Cook, Victor
510Adam, Vincent Pit, Yves Orton.
511
512The list above is almost certainly incomplete as it is automatically generated
513from version control history. In particular, it does not include the names of
514the (very much appreciated) contributors who reported issues to the Perl bug
515tracker.
516
517Many of the changes included in this version originated in the CPAN modules
518included in Perl's core. We're grateful to the entire CPAN community for
519helping Perl to flourish.
520
521For a more complete list of all of Perl's historical contributors, please see
522the F<AUTHORS> file in the Perl source distribution.
523
524=head1 Reporting Bugs
525
526If you find what you think is a bug, you might check the articles recently
527posted to the comp.lang.perl.misc newsgroup and the perl bug database at
528L<https://rt.perl.org/> . There may also be information at
529L<http://www.perl.org/> , the Perl Home Page.
530
531If you believe you have an unreported bug, please run the L<perlbug> program
532included with your release. Be sure to trim your bug down to a tiny but
533sufficient test case. Your bug report, along with the output of C<perl -V>,
534will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
535
536If the bug you are reporting has security implications, which make it
537inappropriate to send to a publicly archived mailing list, then please send it
538to perl5-security-report@perl.org. This points to a closed subscription
539unarchived mailing list, which includes all the core committers, who will be
540able to help assess the impact of issues, figure out a resolution, and help
541co-ordinate the release of patches to mitigate or fix the problem across all
542platforms on which Perl is supported. Please only use this address for
543security issues in the Perl core, not for modules independently distributed on
544CPAN.
545
546=head1 SEE ALSO
547
548The F<Changes> file for an explanation of how to view exhaustive details on
549what changed.
550
551The F<INSTALL> file for how to build Perl.
552
553The F<README> file for general stuff.
554
555The F<Artistic> and F<Copying> files for copyright information.
556
557=cut