This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix RT #121299 - Inconsistent behavior with backreferences nested inside subpattern...
[perl5.git] / pod / perl5197delta.pod
CommitLineData
0dd16e99
RS
1=encoding utf8
2
3=head1 NAME
4
5perl5197delta - what is new for perl v5.19.7
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.19.6 release and the 5.19.7
10release.
11
12If you are upgrading from an earlier release such as 5.19.5, first read
13L<perl5196delta>, which describes differences between 5.19.5 and 5.19.6.
14
15=head1 Core Enhancements
16
17=head2 Postfix syntax for maximum array index
18
19The postfix notation C<< ->$#* >> has been added, to match the similar
20postfix operators added in 5.19.5. C<< $foo->$#* >> is equivalent to
21C<$#$foo>. See L<perlref>.
22
23=head1 Incompatible Changes
24
25=head2 Data::Dumper's output may change
26
27Depending on the data structures dumped and the settings set for
28Data::Dumper, the dumped output may have changed from previous
29versions.
30
31If you have tests that depend on the exact output of Data::Dumper,
32they may fail.
33
34To avoid this problem in your code, test against the data structure
35from evaluating the dumped structure, instead of the dump itself.
36
37=head1 Deprecations
38
39=head2 C<< CGI.pm >>
40
41The C<< CGI.pm >> module has been deprecated since version 3.64.
42
43=head1 Modules and Pragmata
44
45=head2 Updated Modules and Pragmata
46
47=over 4
48
49=item *
50
51L<base> has been upgraded from version 2.19 to 2.20.
52
53C<base> now only ignores load failure on the requested module. [perl
54#120685]
55
56=item *
57
58L<CGI> has been upgraded from version 3.63 to 3.64.
59
60Avoids a warning about "undefined variable in user_agent" in some cases, and
61updates L<CGI::Cookie> documentation to reflect that "HttpOnly" is widely
62supported.
63
64NOTE: L<CGI> is deprecated and may be removed from a future version of Perl.
65
66=item *
67
68L<constant> has been upgraded from version 1.29 to 1.30.
69
70=item *
71
72L<CPAN::Meta> has been upgraded from version 2.132830 to 2.133380.
73
74=item *
75
76L<Data::Dumper> has been upgraded from version 2.149 to 2.150.
77
78Regular expression objects are now dumped in a form closer to their
79original source, eg. C< qr/abc/i > is dumped as exactly that instead of
80C< qr/(?^i:abc)/ >. [perl #82948]
81
82Dumping of hash keys is now more consistent between the XS and perl
83implementations of L<Data::Dumper>, including how the C<quotekeys>
84option behaves. This may make tests that depend on the exact output
85of Data::Dumper to fail. [perl #120384]
86
87=item *
88
89L<DynaLoader> has been upgraded from version 1.21 to 1.22.
90
91=item *
92
93L<ExtUtils::MakeMaker> has been upgraded from version 6.82 to 6.84.
94
95=item *
96
97L<File::Fetch> has been upgraded from version 0.44 to 0.46.
98
99Blacklists "ftp" on DragonflyBSD.
100
101=item *
102
103L<HTTP::Tiny> has been upgraded from version 0.038 to 0.039.
104
105=item *
106
107L<inc::latest> has been upgraded from version 0.4202 to 0.4203.
108NOTE: L<inc::latest> is deprecated and may be removed from a future version of Perl.
109
110=item *
111
112L<Locale::Codes> has been upgraded from version 3.27 to 3.28.
113
114=item *
115
116L<Module::Build> has been upgraded from version 0.4202 to 0.4203.
117NOTE: L<Module::Build> is deprecated and may be removed from a future version of Perl.
118
119=item *
120
121L<Module::CoreList> has been upgraded from version 3.01 to 3.02.
122
123=item *
124
125L<PerlIO::encoding> has been upgraded from version 0.16 to 0.17.
126
127=item *
128
129L<PerlIO::via> has been upgraded from version 0.13 to 0.14.
130
131=item *
132
133L<POSIX> has been upgraded from version 1.36 to 1.37.
134
135=item *
136
137L<SDBM_File> has been upgraded from 1.10 to 1.11.
138
139Added access to SDBM constants and to opening SDBM files with explicit
140page and directory file names. [perl #114350]
141
142=item *
143
144L<Storable> has been upgraded from version 2.47 to 2.48.
145
146=item *
147
148L<threads> has been upgraded from version 1.90 to 1.91.
149
150=item *
151
152L<Time::Piece> has been upgraded from version 1.23 to 1.24.
153
154=item *
155
156L<Unicode::Collate> has been upgraded from version 1.02 to 1.04.
157
158=item *
159
160L<Win32> has been upgraded from version 0.47 to 0.48.
161
162=back
163
164=head1 Diagnostics
165
166The following additions or changes have been made to diagnostic output,
167including warnings and fatal error messages. For the complete list of
168diagnostic messages, see L<perldiag>.
169
170=head2 New Diagnostics
171
172=head3 New Warnings
173
174=over 4
175
176=item *
177
178L<Useless use of greediness modifier|perldiag/"Useless use of greediness modifier '%c' in regex; marked by <-- HERE in m/%s/">
179
180This fixes [Perl #42957].
181
182=back
183
184=head2 Changes to Existing Diagnostics
185
186=over 4
187
188=item *
189
190The error messages for C<my($a?$b$c)> and C<my(do{})> now mention
191"conditional expression" and "do block", respectively, instead of reading
192'Can't declare null operation in "my"'.
193
194=back
195
196=head1 Utility Changes
197
198=head3 C<< Porting/corelist-perldelta.pl >>
199
200=over 4
201
202=item *
203
204Ensure that the latest version of Module::CoreList is used when
205running the script.
206
207=back
208
209=head1 Testing
210
211=over 4
212
213=item *
214
215Various tests in F<t/porting/> are no longer skipped when the perl
216F<.git> directory is outside the perl tree and pointed to by
217C<$GIT_DIR>. [perl #120505]
218
219=back
220
221=head1 Platform Support
222
223=head2 Platform-Specific Notes
224
225=over 4
226
227=item Windows
228
229Experimental support for building with Intel C++ Compiler has been extended to
230cover the dmake makefile (win32/makefile.mk) as well.
231
232=back
233
234=head1 Internal Changes
235
236=over 4
237
238=item *
239
240The C<sv> argument in L<perlapi/sv_2pv_flags>, L<perlapi/sv_2iv_flags>,
241L<perlapi/sv_2uv_flags>, and L<perlapi/sv_2nv_flags> and their older wrappers
242sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now non-NULL. Passing NULL now will crash.
243When the non-NULL marker was introduced en masse in 5.9.3 the functions
244were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if
245NULL was passed, the functions returned 0 or false-type values. The code that
246supports C<sv> argument being non-NULL dates to 5.0 alpha 2 directly, and
247indirectly to Perl 1.0 (pre 5.0 api). The lack of documentation that the
248functions accepted a NULL C<sv> was corrected in 5.11.0 and between 5.11.0
249and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code
250has now been removed, and the functions became non-NULL marked again, because
251core getter-type macros never pass NULL to these functions and would crash
252before ever passing NULL.
253
254The only way a NULL C<sv> can be passed to sv_2*v* functions is if XS code
255directly calls sv_2*v*. This is unlikely as XS code uses Sv*V* macros to get
256the underlying value out of the SV. One possible situation which leads to
257a NULL C<sv> being passed to sv_2*v* functions, is if XS code defines its own
258getter type Sv*V* macros, which check for NULL B<before> dereferencing and
259checking the SV's flags through public API Sv*OK* macros or directly using
260private API C<SvFLAGS>, and if C<sv> is NULL, then calling the sv_2*v functions
261with a NULL litteral or passing the C<sv> containing a NULL value.
262
263=back
264
265=head1 Selected Bug Fixes
266
267=over 4
268
269=item *
270
271C<< semctl(..., SETVAL, ...) >> would set the semaphore to the top
27232-bits of the supplied integer instead of the bottom 32-bits on
27364-bit big-endian systems. [perl #120635]
274
275=item *
276
277A regression since v5.18.0 has been fixed in which C<qr/[[:^ascii:]]/d>
278failed to match any character in the range C<\x80> - C<\xFF> if its
279surrounding character class contained anything else. (That is, the bug
280didn't happen if the C<[:^ascii:]> was the only element of the character
281class.) [perl #120799]
282
283=item *
284
285C<< readdir() >> now only sets C<$!> on error. C<$!> is no longer set
286to C<EBADF> when then terminating C<undef> is read from the directory
287unless the system call sets C<$!>. [perl #118651]
288
289=item *
290
291C<&CORE::glob> no longer causes an intermittent crash due to perl's stack
292getting corrupted. [perl #119993]
293
294=item *
295
296C<open> with layers that load modules (e.g., "<:encoding(utf8)") no longer
297runs the risk of crashing due to stack corruption.
298
299=item *
300
301When a reference to a reference to an overloaded object was returned from
302a regular expression C<(??{...})> code block, an incorrect implicit
303dereference could take place if the inner reference had been returned by
304a code block previously.
305
306=item *
307
308A tied variable returned from C<(??{...})> sees the inner values of match
309variables (i.e., the $1 etc. from any matches inside the block) in its
310FETCH method. This was not the case if a reference to an overloaded object
311was the last thing assigned to the tied variable. Instead, the match
312variables referred to the outer pattern during the FETCH call.
313
314=item *
315
316Perl 5.18 broke autoloading via C<< ->SUPER::foo >> method calls by looking
317up AUTOLOAD from the current package rather than the current package's
318superclass. This has been fixed. [perl #120694]
319
320=item *
321
322A longstanding bug causing C<do {} until CONSTANT>, where the constant
323holds a true value, to read unallocated memory has been resolved. This
324would usually happen after a syntax error. In past versions of Perl it has
325crashed intermittently. [perl #72406]
326
327=item *
328
329Fix HP-UX $! failure. HP-UX strerror() returns an empty string for an
330unknown error code. This caused an assertion to fail under DEBUGGING
331builds. This patch removes the assertion and changes the return into
332a non-empty string indicating the errno is for an unknown error.
333
334=item *
335
336Fix unexpected tainting via regexp using locale. Previously, under certain
337conditions, the use of character classes could cause tainting when it
338shouldn't. Some character classes are locale-dependent, but before this
339patch, sometimes tainting was happening even for character classes that
340don't depend on the locale. [perl #120675]
341
342=item *
343
344Under certain conditions, Perl would throw an error if in an lookbehind
345assertion in a regexp, the assertion referred to a named subpattern,
346complaining the lookbehind was variable when it wasn't. This has been
347fixed. [perl #120600], [perl #120618]. The current fix may be improved
348on in the future.
349
350=back
351
352=head1 Acknowledgements
353
354Perl 5.19.7 represents approximately 4 weeks of development since Perl 5.19.6
355and contains approximately 90,000 lines of changes across 390 files from 26
356authors.
357
358Perl continues to flourish into its third decade thanks to a vibrant community
359of users and developers. The following people are known to have contributed the
360improvements that became Perl 5.19.7:
361
362Abigail, Abir Viqar, Brian Childs, Brian Fraser, Chris 'BinGOs' Williams, Craig
363A. Berry, Dabrien 'Dabe' Murphy, Daniel Dragan, David Mitchell, Dennis
364Kaarsemaker, Evan Zacks, Father Chrysostomos, François Perrad, Graham Knop,
365James E Keenan, Jess Robinson, Karl Williamson, Kevin Ryde, Martin McGrath,
366Matthew Horsfall, Nicholas Clark, Peter Martini, Ricardo Signes, Steve Hay,
367Tony Cook, Yves Orton.
368
369The list above is almost certainly incomplete as it is automatically generated
370from version control history. In particular, it does not include the names of
371the (very much appreciated) contributors who reported issues to the Perl bug
372tracker.
373
374Many of the changes included in this version originated in the CPAN modules
375included in Perl's core. We're grateful to the entire CPAN community for
376helping Perl to flourish.
377
378For a more complete list of all of Perl's historical contributors, please see
379the F<AUTHORS> file in the Perl source distribution.
380
381=head1 Reporting Bugs
382
383If you find what you think is a bug, you might check the articles recently
384posted to the comp.lang.perl.misc newsgroup and the perl bug database at
385https://rt.perl.org/ . There may also be information at
386http://www.perl.org/ , the Perl Home Page.
387
388If you believe you have an unreported bug, please run the L<perlbug> program
389included with your release. Be sure to trim your bug down to a tiny but
390sufficient test case. Your bug report, along with the output of C<perl -V>,
391will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
392
393If the bug you are reporting has security implications, which make it
394inappropriate to send to a publicly archived mailing list, then please send it
395to perl5-security-report@perl.org. This points to a closed subscription
396unarchived mailing list, which includes all the core committers, who will be
397able to help assess the impact of issues, figure out a resolution, and help
398co-ordinate the release of patches to mitigate or fix the problem across all
399platforms on which Perl is supported. Please only use this address for
400security issues in the Perl core, not for modules independently distributed on
401CPAN.
402
403=head1 SEE ALSO
404
405The F<Changes> file for an explanation of how to view exhaustive details on
406what changed.
407
408The F<INSTALL> file for how to build Perl.
409
410The F<README> file for general stuff.
411
412The F<Artistic> and F<Copying> files for copyright information.
413
414=cut