This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perllocale: Add note about ENVIRONMENT variable
[perl5.git] / pod / perl5198delta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perl5198delta - what is new for perl v5.19.8
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.19.7 release and the 5.19.8
10 release.
11
12 If you are upgrading from an earlier release such as 5.19.6, first read
13 L<perl5197delta>, which describes differences between 5.19.6 and 5.19.7.
14
15 =head1 Core Enhancements
16
17 =head2 New C<\p{Unicode}> regular expression pattern property
18
19 This is a synonym for C<\p{Any}> and matches the set of Unicode-defined
20 code points 0 - 0x10FFFF.
21
22 =head1 Incompatible Changes
23
24 =head2 C<do> can no longer be used to call subroutines
25
26 The C<do SUBROUTINE(LIST)> form has resulted in a deprecation warning
27 since Perl v5.0.0, and is now a syntax error.
28
29 =head2 C<\p{}>, C<\P{}> matching has changed for non-Unicode code
30 points.
31
32 C<\p{}> and C<\P{}> are defined by Unicode only on Unicode-defined code
33 points (C<U+0000> through C<U+10FFFF>).  Their behavior on matching
34 these legal Unicode code points is unchanged, but there are changes for
35 code points C<0x110000> and above.  Previously, Perl treated the result
36 of matching C<\p{}> and C<\P{}> against these as C<undef>, which
37 translates into "false".  For C<\P{}>, this was then complemented into
38 "true".  A warning was supposed to be raised when this happened.
39 However, various optimizations could prevent the warning, and the
40 results were often counter-intuitive, with both a match and its seeming
41 complement being false.  Now all non-Unicode code points are treated as
42 typical unassigned Unicode code points.  This generally is more
43 Do-What-I-Mean.  A warning is raised only if the results are arguably
44 different from a strict Unicode approach, and from what Perl used to do.
45 Code that needs to be strictly Unicode compliant can make this warning
46 fatal, and then Perl always raises the warning.
47
48 Details are in L<perlunicode/Beyond Unicode code points>.
49
50 =head2 C<\p{All}> has been expanded to match all possible code points
51
52 The Perl-defined regular expression pattern element C<\p{All}>, unused
53 on CPAN, used to match just the Unicode code points; now it matches all
54 possible code points; that is, it is equivalent to C<qr/./s>.  Thus
55 C<\p{All}> is no longer synonymous with C<\p{Any}>, which continues to
56 match just the Unicode code points, as Unicode says it should.
57
58 =head1 Deprecations
59
60 XXX Any deprecated features, syntax, modules etc. should be listed here.
61
62 =head2 Module removals
63
64 XXX Remove this section if inapplicable.
65
66 The following modules will be removed from the core distribution in a
67 future release, and will at that time need to be installed from CPAN.
68 Distributions on CPAN which require these modules will need to list them as
69 prerequisites.
70
71 The core versions of these modules will now issue C<"deprecated">-category
72 warnings to alert you to this fact.  To silence these deprecation warnings,
73 install the modules in question from CPAN.
74
75 Note that these are (with rare exceptions) fine modules that you are encouraged
76 to continue to use.  Their disinclusion from core primarily hinges on their
77 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
78 not usually on concerns over their design.
79
80 =over
81
82 XXX Note that deprecated modules should be listed here even if they are listed
83 as an updated module in the L</Modules and Pragmata> section.
84
85 =back
86
87 =head1 Modules and Pragmata
88
89 =head2 New Modules and Pragmata
90
91 =over 4
92
93 =item *
94
95 L<IO::Socket::IP> has been (tentatively) added to core at version 0.26.
96
97 =back
98
99 =head2 Updated Modules and Pragmata
100
101 =over 4
102
103 =item *
104
105 L<perl5db.pl> has been upgraded from version 1.42 to 1.43
106
107 Fix a crash in tab completion, where available. [perl #120827]
108
109 The debugger tests no longer open two handles to the same output file,
110 making them more robust. [perl #118817]
111
112 =item *
113
114 L<base> has been upgraded from version 2.20 to 2.21.
115
116 The stricter load failure tests added in 2.20 now allow for
117 C<${^LAST_FH}> being set.
118
119 =item *
120
121 L<constant> has been upgraded from version 1.30 to 1.31.
122
123 =item *
124
125 L<DynaLoader> has been upgraded from version 1.22 to 1.24.
126
127 =item *
128
129 L<Encode> has been upgraded from version 2.55 to 2.57.
130
131 UTF-8 is no longer used in the C source (which some compilers didn't like), and
132 some POD errors have been fixed in the documentation.
133
134 =item *
135
136 L<Errno> has been upgraded from version 1.20_01 to 1.20_02.
137
138 =item *
139
140 L<ExtUtils::CBuilder> has been upgraded from version 0.280212 to 0.280213.
141
142 =item *
143
144 L<ExtUtils::MakeMaker> has been upgraded from version 6.84 to 6.86.
145
146 =item *
147
148 L<File::Copy> has been upgraded from version 2.28 to 2.29.
149
150 =item *
151
152 L<Hash::Util::FieldHash> has been upgraded from version 1.13 to 1.14.
153
154 =item *
155
156 L<inc::latest> has been upgraded from version 0.4203 to 0.4204.
157 NOTE: L<inc::latest> is deprecated and may be removed from a future version of
158 Perl.
159
160 =item *
161
162 L<IO::Socket::UNIX> has been upgraded from version 1.25 to 1.26.
163
164 Removed a warning about an ancient behaviour change and filled out the
165 SYNOPSIS. [perl #120981]
166
167 =item *
168
169 The libnet module collection has been upgraded from version 1.23 to 1.24.
170
171 The handling of CRLF characters in L<Net::FTP> has been fixed.
172
173 =item *
174
175 L<List::Util> has been upgraded from version 1.35 to 1.36.
176
177 =item *
178
179 L<Module::Build> has been upgraded from version 0.4203 to 0.4204.
180 NOTE: L<Module::Build> is deprecated and may be removed from a future version
181 of Perl.
182
183 =item *
184
185 L<Module::CoreList> has been upgraded from version 3.02 to 3.04.
186
187 =item *
188
189 L<Module::Load> has been upgraded from version 0.24 to 0.28.
190
191 =item *
192
193 L<Module::Load::Conditional> has been upgraded from version 0.58 to 0.60.
194
195 =item *
196
197 L<Perl::OSType> has been upgraded from version 1.006 to 1.007.
198
199 =item *
200
201 L<PerlIO::encoding> has been upgraded from version 0.17 to 0.18.
202
203 =item *
204
205 L<Pod::Perldoc> has been upgraded from version 3.20 to 3.21.
206
207 =item *
208
209 L<POSIX> has been upgraded from version 1.37 to 1.38_01.
210
211 =item *
212
213 L<Scalar::Util> has been upgraded from version 1.35 to 1.36.
214
215 =item *
216
217 L<threads::shared> has been upgraded from version 1.45 to 1.46.
218
219 =item *
220
221 L<Time::Piece> has been upgraded from version 1.24 to 1.27.
222
223 =item *
224
225 L<Unicode::UCD> has been upgraded from version 0.55 to 0.57.
226
227 =item *
228
229 L<version> has been upgraded from version 0.9904 to 0.9907.
230
231 =item *
232
233 L<warnings> has been upgraded from version 1.20 to 1.21.
234
235 =item *
236
237 L<XSLoader> has been upgraded from version 0.16 to 0.17.
238
239 =back
240
241 =head1 Documentation
242
243 =head2 Changes to Existing Documentation
244
245 =over 4
246
247 =item *
248
249 L<perlunicode> has been updated to reflect C<Bidi_Class> changes in Unicode
250 6.3.
251
252 =back
253
254 =head1 Diagnostics
255
256 The following additions or changes have been made to diagnostic output,
257 including warnings and fatal error messages.  For the complete list of
258 diagnostic messages, see L<perldiag>.
259
260 =head3 New Warnings
261
262 =over 4
263
264 =item *
265
266 %s on a reference is now experimental
267
268 The "auto-deref" feature is now experimental.
269
270 Starting in v5.14.0, it was possible to use push, pop, keys, and other
271 built-in functions not only on aggregate types, but on references to
272 them.  The feature was not deployed to its original intended
273 specification, and now may become redundant to postfix dereferencing.
274 It has always been categorized as an experimental feature, and in
275 v5.20.0 is carries a warning as such.
276
277 Warnings will now be issued at compile time when these operations are
278 detected.
279
280   no if $] >= 5.01908, warnings => "experimental::autoderef";
281
282 Consider, though, replacing the use of these features, as they may
283 change behavior again before becoming stable.
284
285 =item *
286
287 L<Matched non-Unicode code point 0x%X against Unicode property; may not be portable|perldiag/"Matched non-Unicode code point 0x%X against Unicode property; may not be portable">.
288 This replaces the message "Code point 0x%X is not Unicode, all \p{}
289 matches fail; all \P{} matches succeed".
290
291 =back
292
293 =head1 Utility Changes
294
295 =head3 L<perlbug>
296
297 =over 4
298
299 =item *
300
301 F<perlbug> now has a C<-p> option for attaching patches with a bug report.
302
303 =item *
304
305 F<perlbug> now does input in the encoding of the current locale and
306 output raw.
307
308 =back
309
310 =head1 Configuration and Compilation
311
312 =over 4
313
314 =item *
315
316 Distinct library basenames with C<d_libname_unique>.
317
318 When compiling perl with this option, the library files for XS modules are
319 named something "unique" -- for example, Hash/Util/Util.so becomes
320 Hash/Util/PL_Hash__Util.so.  This behavior is similar to what currently
321 happens on VMS, and serves as groundwork for the Android port.
322
323 =item *
324
325 C<sysroot> option to indicate the logical root directory under gcc and clang.
326
327 When building with this option set, both Configure and the compilers search
328 for all headers and libraries under this new sysroot, instead of /.
329
330 This is a huge time saver if cross-compiling, but can also help
331 on native builds if your toolchain's files have non-standard locations.
332
333 =back
334
335 =head1 Platform Support
336
337 =over 4
338
339 =item *
340
341 Code related to supporting C<sfio> has been removed.
342
343 Perl 5.004 added support to use the native API of C<sfio>, AT&T's Safe/Fast
344 I/O library. This code still built with v5.8.0, albeit with many regression
345 tests failing, but was inadvertently broken before the v5.8.1 release,
346 meaning that it has not worked on any version of Perl released since then.
347 In over a decade we have received no bug reports about this, hence it is clear
348 that no-one is using this functionality on any version of Perl that is still
349 supported to any degree.
350
351 =back
352
353 =head2 Platform-Specific Notes
354
355 =over 4
356
357 =item Cygwin
358
359 recv() on a connected handle would populate the returned sender
360 address with whatever happened to be in the working buffer.  recv()
361 now uses a workaround similar to the Win32 recv() wrapper and returns
362 an empty string when recvfrom(2) doesn't modify the supplied address
363 length. [perl #118843]
364
365 =back
366
367 =head1 Internal Changes
368
369 =over 4
370
371 =item newATTRSUB is now a macro
372
373 The public API newATTRSUB was previously a macro to the private
374 function Perl_newATTRSUB. Function Perl_newATTRSUB has been removed. newATTRSUB
375 is now macro to a different internal function.
376
377 =item Changes in warnings raised by C<utf8n_to_uvchr()>
378
379 This bottom level function decodes the first character of a UTF-8 string
380 into a code point.  It is accessible to C<XS> level code, but it's
381 discouraged from using it directly.  There are higher level functions
382 that call this that should be used instead, such as
383 L<perlapi/utf8_to_uvchr_buf>.  For completeness though, this documents
384 some changes to it.  Now, tests for malformations are done before any
385 tests for other potential issues.  One of those issues involves code
386 points so large that they have never appeared in any official standard
387 (the current standard has scaled back the highest acceptable code point
388 from earlier versions).  It is possible (though not done in CPAN) to
389 warn and/or forbid these code points, while accepting smaller code
390 points that are still above the legal Unicode maximum.  The warning
391 message for this now includes the code point if representable on the
392 machine.  Previously it always displayed raw bytes, which is what it
393 still does for non-representable code points.
394
395 =back
396
397 =head1 Selected Bug Fixes
398
399 =over 4
400
401 =item *
402
403 In v5.19.6, C<do CORE()> was inadvertently changed from being interpreted
404 as do-file (i.e., C<do +CORE()>) to do-sub (i.e., C<&CORE()>).  It has now
405 been changed back.
406
407 =item *
408
409 v5.19.7 inadvertently caused freed scalars to be passed to subroutines in
410 @INC if it contained multiple subs.  This has been fixed. [perl #120657]
411
412 =item *
413
414 Individually-tied elements of @INC (as in C<tie $INC[0]...>) are now
415 handled correctly.  Formerly, whether a sub returned by such a tied element
416 would be treated as a sub depended on whether a FETCH had occurred
417 previously.
418
419 =item *
420
421 C<getc> on a byte-sized handle after the same C<getc> operator had been
422 used on a utf8 handle used to treat the bytes as utf8, resulting in erratic
423 behavior (e.g., malformed UTF-8 warnings).
424
425 =item *
426
427 An initial C<{> at the beginning of a format argument line was always
428 interpreted as the beginning of a block prior to v5.18.  In Perl v5.18, it
429 started being treated as an ambiguous token.  The parser would guess
430 whether it was supposed to be an anonymous hash constructor or a block
431 based on the contents.  Now the previous behavious has been restored.
432 [perl #119973]
433
434 =item *
435
436 In Perl v5.18 C<undef *_; goto &sub> and C<local *_; goto &sub> started
437 crashing.  This has been fixed. [perl #119949]
438
439 =back
440
441 =head1 Acknowledgements
442
443 Perl 5.19.8 represents approximately 4 weeks of development since Perl 5.19.7
444 and contains approximately 38,000 lines of changes across 420 files from 26
445 authors.
446
447 Perl continues to flourish into its third decade thanks to a vibrant community
448 of users and developers. The following people are known to have contributed the
449 improvements that became Perl 5.19.8:
450
451 Abigail, Alan Hourihane, Brian Fraser, Brian Gottreu, Chris 'BinGOs' Williams,
452 Christian Millour, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan,
453 David Mitchell, Dominic Hargreaves, Father Chrysostomos, H.Merijn Brand, James
454 E Keenan, Jess Robinson, John Peacock, Karl Williamson, Martin McGrath, Matthew
455 Horsfall, Nicholas Clark, Ricardo Signes, Shlomi Fish, Steve Hay, Tobias Leich,
456 Tony Cook, Ævar Arnfjörð Bjarmason.
457
458 The list above is almost certainly incomplete as it is automatically generated
459 from version control history. In particular, it does not include the names of
460 the (very much appreciated) contributors who reported issues to the Perl bug
461 tracker.
462
463 Many of the changes included in this version originated in the CPAN modules
464 included in Perl's core. We're grateful to the entire CPAN community for
465 helping Perl to flourish.
466
467 For a more complete list of all of Perl's historical contributors, please see
468 the F<AUTHORS> file in the Perl source distribution.
469
470 =head1 Reporting Bugs
471
472 If you find what you think is a bug, you might check the articles recently
473 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
474 https://rt.perl.org/ .  There may also be information at
475 http://www.perl.org/ , the Perl Home Page.
476
477 If you believe you have an unreported bug, please run the L<perlbug> program
478 included with your release.  Be sure to trim your bug down to a tiny but
479 sufficient test case.  Your bug report, along with the output of C<perl -V>,
480 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
481
482 If the bug you are reporting has security implications, which make it
483 inappropriate to send to a publicly archived mailing list, then please send it
484 to perl5-security-report@perl.org.  This points to a closed subscription
485 unarchived mailing list, which includes all the core committers, who will be
486 able to help assess the impact of issues, figure out a resolution, and help
487 co-ordinate the release of patches to mitigate or fix the problem across all
488 platforms on which Perl is supported.  Please only use this address for
489 security issues in the Perl core, not for modules independently distributed on
490 CPAN.
491
492 =head1 SEE ALSO
493
494 The F<Changes> file for an explanation of how to view exhaustive details on
495 what changed.
496
497 The F<INSTALL> file for how to build Perl.
498
499 The F<README> file for general stuff.
500
501 The F<Artistic> and F<Copying> files for copyright information.
502
503 =cut