Commit | Line | Data |
---|---|---|
3a5c9134 CBW |
1 | =encoding utf8 |
2 | ||
f8109d5c | 3 | =for comment XXX |
e1165778 | 4 | This has been completed up to e57c1822. |
59773fc7 | 5 | |
3a5c9134 CBW |
6 | =head1 NAME |
7 | ||
3a5c9134 CBW |
8 | perldelta - what is new for perl v5.13.8 |
9 | ||
10 | =head1 DESCRIPTION | |
11 | ||
f8109d5c Z |
12 | This document describes differences between the 5.13.7 release and |
13 | the 5.13.8 release. | |
3a5c9134 | 14 | |
dbbe2d83 | 15 | If you are upgrading from an earlier release such as 5.13.6, first read |
3a5c9134 CBW |
16 | L<perl5137delta>, which describes differences between 5.13.6 and |
17 | 5.13.7. | |
18 | ||
3a5c9134 CBW |
19 | =head1 Core Enhancements |
20 | ||
b19934fb NC |
21 | =head2 C<-d:-foo> calls C<Devel::foo::unimport> |
22 | ||
23 | The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>> | |
6a8c8694 FC |
24 | equivalent to C<-MDevel::foo=bar>, which expands |
25 | internally to C<use Devel::foo 'bar';>. | |
b19934fb NC |
26 | F<perl> now allows prefixing the module name with C<->, with the same |
27 | semantics as C<-M>, I<i.e.> | |
28 | ||
29 | =over 4 | |
30 | ||
31 | =item C<-d:-foo> | |
32 | ||
6a8c8694 FC |
33 | Equivalent to C<-M-Devel::foo>, expands to |
34 | C<no Devel::foo;>, calls C<< Devel::foo->unimport() >> | |
b19934fb NC |
35 | if the method exists. |
36 | ||
37 | =item C<-d:-foo=bar> | |
38 | ||
6a8c8694 FC |
39 | Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>, |
40 | calls C<< Devel::foo->unimport('bar') >> if the method exists. | |
b19934fb NC |
41 | |
42 | =back | |
43 | ||
44 | This is particularly useful to suppresses the default actions of a | |
45 | C<Devel::*> module's C<import> method whilst still loading it for debugging. | |
46 | ||
f8109d5c | 47 | =head2 Filehandle method calls load L<IO::File> on demand |
15e6cdd9 | 48 | |
f8109d5c Z |
49 | When a method call on a filehandle would die because the method cannot |
50 | be resolved, and L<IO::File> has not been loaded, Perl now loads L<IO::File> | |
15e6cdd9 DG |
51 | via C<require> and attempts method resolution again: |
52 | ||
53 | open my $fh, ">", $file; | |
54 | $fh->binmode(":raw"); # loads IO::File and succeeds | |
55 | ||
56 | This also works for globs like STDOUT, STDERR and STDIN: | |
57 | ||
58 | STDOUT->autoflush(1); | |
59 | ||
60 | Because this on-demand load only happens if method resolution fails, the | |
f8109d5c | 61 | legacy approach of manually loading an L<IO::File> parent class for partial |
15e6cdd9 DG |
62 | method support still works as expected: |
63 | ||
64 | use IO::Handle; | |
65 | open my $fh, ">", $file; | |
66 | $fh->autoflush(1); # IO::File not loaded | |
67 | ||
20db7501 KW |
68 | =head2 Full functionality for C<use feature 'unicode_strings'> |
69 | ||
70 | This release provides full functionality for C<use feature | |
71 | 'unicode_strings'>. Under its scope, all string operations executed and | |
72 | regular expressions compiled (even if executed outside its scope) have | |
f8109d5c | 73 | Unicode semantics. See L<feature>. |
20db7501 | 74 | |
f8109d5c | 75 | This feature avoids most forms of the "Unicode Bug" (See |
20db7501 KW |
76 | L<perlunicode/The "Unicode Bug"> for details.) If their is a |
77 | possibility that your code will process Unicode strings, you are | |
78 | B<strongly> encouraged to use this subpragma to avoid nasty surprises. | |
79 | ||
07291fb1 KW |
80 | This availability of this should strongly affect the whole tone of |
81 | various documents, such as L<perlunicode> and L<perluniintro>, but this | |
82 | work has not been done yet. | |
83 | ||
ee076ba5 FR |
84 | =head2 Exception Handling Backcompat Hack |
85 | ||
86 | When an exception is thrown in an C<eval BLOCK>, C<$@> is now set before | |
87 | unwinding, as well as being set after unwinding as the eval block exits. This | |
88 | early setting supports code that has historically treated C<$@> during unwinding | |
89 | as an indicator of whether the unwinding was due to an exception. These modules | |
90 | had been broken by 5.13.1's change from setting C<$@> early to setting it late. | |
91 | This double setting arrangement is a stopgap until the reason for unwinding can | |
92 | be made properly introspectable. C<$@> has never been a reliable indicator of | |
f8109d5c | 93 | the reason for unwinding. |
ee076ba5 | 94 | |
f8109d5c | 95 | =head2 printf-like functions understand post-1980 size modifiers |
f6166f76 CS |
96 | |
97 | Perl's printf and sprintf operators, and Perl's internal printf replacement | |
98 | function, now understand the C90 size modifiers "hh" (C<char>), "z" | |
99 | (C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99 | |
100 | compiler, Perl now understands the size modifier "j" (C<intmax_t>). | |
101 | ||
102 | So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'. | |
103 | ||
0d157ee2 DL |
104 | =head2 DTrace probes now include package name |
105 | ||
106 | The DTrace probes now include an additional argument (C<arg3>) which contains | |
107 | the package the subroutine being entered or left was compiled in. | |
108 | ||
109 | For example using the following DTrace script: | |
110 | ||
111 | perl$target:::sub-entry | |
112 | { | |
113 | printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3)); | |
114 | } | |
115 | ||
116 | and then running: | |
117 | ||
118 | perl -e'sub test { }; test' | |
119 | ||
120 | DTrace will print: | |
121 | ||
122 | main::test | |
123 | ||
bd8e866d FC |
124 | =head2 Stacked labels |
125 | ||
126 | Multiple statement labels can now appear before a single statement. | |
127 | ||
3a5c9134 CBW |
128 | =head1 Incompatible Changes |
129 | ||
f8109d5c | 130 | =head2 C<:=> is now a syntax error |
3a5c9134 | 131 | |
2dc78664 NC |
132 | Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>, |
133 | with the C<:> being treated as the start of an attribute list, ending before | |
134 | the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now | |
135 | a syntax error. This will allow the future use of C<:=> as a new token. | |
3a5c9134 | 136 | |
2dc78664 NC |
137 | We find no Perl 5 code on CPAN using this construction, outside the core's |
138 | tests for it, so we believe that this change will have very little impact on | |
139 | real-world codebases. | |
140 | ||
141 | If it is absolutely necessary to have empty attribute lists (for example, | |
baed7a72 NC |
142 | because of a code generator) then avoid the error by adding a space before |
143 | the C<=>. | |
3a5c9134 | 144 | |
d66e82e8 FC |
145 | =head2 Run-time code block in regular expressions |
146 | ||
147 | Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not | |
148 | to inherit any pragmata (strict, warnings, etc.) if the regular expression | |
149 | was compiled at run time as happens in cases like these two: | |
150 | ||
151 | use re 'eval'; | |
152 | $foo =~ $bar; # when $bar contains (?{...}) | |
153 | $foo =~ /$bar(?{ $finished = 1 })/; | |
154 | ||
155 | This was a bug, which has now been fixed. But it has the potential to break | |
156 | any code that was relying on this bug. | |
157 | ||
3a5c9134 CBW |
158 | =head1 Deprecations |
159 | ||
59773fc7 FC |
160 | =head2 C<?PATTERN?> is deprecated |
161 | ||
162 | C<?PATTERN?> (without the initial m) has been deprecated and now produces | |
f8109d5c Z |
163 | a warning. This is to allow future use of C<?> in new operators. |
164 | The match-once functionality is still available in the form of C<m?PATTERN?>. | |
59773fc7 | 165 | |
f8109d5c | 166 | =head2 C<sv_compile_2op()> is now deprecated |
d59a8b3e | 167 | |
f8109d5c | 168 | The C<sv_compile_2op()> API function is now deprecated. Searches suggest |
d59a8b3e NC |
169 | that nothing on CPAN is using it, so this should have zero impact. |
170 | ||
171 | It attempted to provide an API to compile code down to an optree, but failed | |
172 | to bind correctly to lexicals in the enclosing scope. It's not possible to | |
173 | fix this problem within the constraints of its parameters and return value. | |
174 | ||
5609d5f9 FC |
175 | =head2 Tie functions on scalars holding typeglobs |
176 | ||
177 | Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument | |
178 | acts on a file handle if the scalar happens to hold a typeglob. | |
179 | ||
180 | This is a long-standing bug that will be removed in Perl 5.16, as | |
181 | there is currently no way to tie the scalar itself when it holds | |
182 | a typeglob, and no way to untie a scalar that has had a typeglob | |
183 | assigned to it. | |
184 | ||
185 | This bug was fixed in 5.13.7 but, because of the breakage it caused, the | |
186 | fix has been reverted. Now there is a deprecation warning whenever a tie | |
187 | function is used on a handle without an explicit C<*>. | |
188 | ||
3a5c9134 CBW |
189 | =head1 Modules and Pragmata |
190 | ||
3a5c9134 CBW |
191 | =head2 Updated Modules and Pragmata |
192 | ||
193 | =over 4 | |
194 | ||
195 | =item * | |
196 | ||
e1165778 Z |
197 | C<Archive::Tar> has been upgraded from version 1.72 to 1.74. |
198 | ||
199 | =item * | |
200 | ||
201 | C<autodie> has been upgraded from version 2.10 to 2.1001. | |
202 | ||
203 | =item * | |
204 | ||
205 | C<B> has been upgraded from version 1.26 to 1.27. | |
c3e6accb CBW |
206 | |
207 | =item * | |
208 | ||
04b0a669 FC |
209 | C<B::Concise> has been upgraded from version 0.81 to 0.82. |
210 | ||
211 | It no longer produces mangled output with the C<-tree> option | |
212 | L<[perl #80632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80632>. | |
213 | ||
214 | =item * | |
215 | ||
e1165778 Z |
216 | C<B::Deparse> has been upgraded from version 1.01 to 1.02. |
217 | ||
218 | =item * | |
219 | ||
220 | C<Cwd> has been upgraded from version 3.34 to 3.35. | |
c2f8ff19 FR |
221 | |
222 | =item * | |
223 | ||
e1165778 Z |
224 | C<Data::Dumper> has been upgraded from version 2.130_01 to 2.130_02. |
225 | ||
226 | =item * | |
227 | ||
228 | C<Devel::Peek> has been upgraded from version 1.05 to 1.06. | |
229 | ||
230 | =item * | |
0a178734 | 231 | |
e1165778 Z |
232 | C<Devel::SelfStubber> has been upgraded from version 1.03 to 1.05. |
233 | ||
234 | =item * | |
235 | ||
236 | C<Digest::SHA> has been upgraded from 5.48 to 5.50. | |
237 | ||
f8109d5c | 238 | C<shasum> now more closely mimics C<sha1sum>/C<md5sum>, and C<Addfile> |
0a178734 | 239 | accepts all POSIX filenames. |
8d849515 FR |
240 | |
241 | =item * | |
242 | ||
243 | C<Dumpvalue> has been upgraded from version 1.14 to 1.15. | |
0a178734 CBW |
244 | |
245 | =item * | |
246 | ||
e1165778 Z |
247 | C<DynaLoader> has been upgraded from version 1.11 to 1.12. |
248 | ||
249 | =item * | |
250 | ||
5b0bc4e8 FR |
251 | C<Env> has been upgraded from version 1.01 to 1.02. |
252 | ||
253 | =item * | |
254 | ||
e1165778 Z |
255 | C<ExtUtils::CBuilder> has been upgraded from 0.2703 to 0.280201. |
256 | ||
257 | =item * | |
258 | ||
259 | C<ExtUtils::Constant> has been upgraded from 0.02 to 0.03. | |
06e8058f CBW |
260 | |
261 | =item * | |
262 | ||
121e1895 FC |
263 | C<ExtUtils::Embed> has been upgraded from 1.29 to 1.30. |
264 | ||
265 | =item * | |
266 | ||
e1165778 Z |
267 | C<ExtUtils::ParseXS> has been upgraded from 2.2207 to 2.2208. |
268 | ||
269 | =item * | |
270 | ||
271 | C<Fcntl> has been upgraded from 1.10 to 1.11. | |
272 | ||
273 | =item * | |
274 | ||
275 | C<feature> has been upgraded from 1.18 to 1.19. | |
276 | ||
277 | =item * | |
278 | ||
279 | C<File::CheckTree> has been upgraded from 4.4 to 4.41. | |
280 | ||
281 | =item * | |
282 | ||
283 | C<File::Glob> has been upgraded from 1.10 to 1.11. | |
284 | ||
285 | =item * | |
286 | ||
287 | C<GDBM_File> has been upgraded from 1.12 to 1.13. | |
288 | ||
289 | =item * | |
290 | ||
291 | C<Hash::Util::FieldHash> has been upgraded from 1.06 to 1.07. | |
292 | ||
293 | =item * | |
294 | ||
295 | C<I18N::Collate> has been upgraded from 1.01 to 1.02. | |
296 | ||
297 | =item * | |
298 | ||
11f2b7f3 FR |
299 | C<if> has been upgraded from 0.06 to 0.0601. |
300 | ||
301 | =item * | |
302 | ||
e1165778 | 303 | C<IO> has been upgraded from 1.25_02 to 1.25_03. |
92c0bb90 FR |
304 | |
305 | =item * | |
306 | ||
e1165778 | 307 | C<IPC::Cmd> has been upgraded from 0.64 to 0.66. |
39b09a1b CBW |
308 | |
309 | Resolves an issue with splitting Win32 command lines | |
310 | and documentation enhancements. | |
311 | ||
312 | =item * | |
313 | ||
121e1895 FC |
314 | C<IPC::Open3> has been upgraded from 1.07 to 1.08. |
315 | ||
316 | =item * | |
317 | ||
e1165778 Z |
318 | C<Locale::Codes> has been upgraded from version 3.14 to 3.15. |
319 | ||
320 | =item * | |
321 | ||
322 | C<Math::BigInt> has been upgraded from 1.99_01 to 1.99_02. | |
1245abf1 CBW |
323 | |
324 | =item * | |
325 | ||
28502098 FR |
326 | C<Memoize> has been upgraded from version 1.01_03 to 1.02. |
327 | ||
328 | =item * | |
329 | ||
e1165778 | 330 | C<MIME::Base64> has been upgraded from 3.10 to 3.13. |
2456140e | 331 | |
f8109d5c | 332 | Now provides C<encode_base64url> and C<decode_base64url> functions to process |
2456140e CBW |
333 | the base64 scheme for "URL applications". |
334 | ||
335 | =item * | |
336 | ||
ad033849 FC |
337 | C<mro> has been upgraded from version 1.05 to 1.06. |
338 | ||
339 | C<next::method> I<et al.> now take into account that every class inherits | |
340 | from UNIVERSAL | |
341 | L<[perl #68654]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68654>. | |
342 | ||
343 | =item * | |
344 | ||
e1165778 Z |
345 | C<NDBM_File> has been upgraded from 1.10 to 1.11. |
346 | ||
347 | =item * | |
348 | ||
121e1895 FC |
349 | C<Net::Ping> has been upgraded from 2.36 to 2.37. |
350 | ||
351 | =item * | |
352 | ||
e1165778 Z |
353 | C<ODBM_File> has been upgraded from 1.09 to 1.10. |
354 | ||
355 | =item * | |
356 | ||
357 | C<Opcode> has been upgraded from 1.17 to 1.18. | |
358 | ||
359 | =item * | |
360 | ||
2638c0ff FC |
361 | C<overload> has been upgraded from 1.11 to 1.12. |
362 | ||
363 | =item * | |
364 | ||
121e1895 FC |
365 | C<PerlIO::encoding> has been upgraded from 0.13 to 0.14. |
366 | ||
367 | =item * | |
368 | ||
2638c0ff FC |
369 | C<PerlIO::scalar> has been upgraded from 0.10 to 0.11. |
370 | ||
371 | A C<read> after a C<seek> beyond the end of the string no longer thinks it | |
372 | has data to read | |
373 | L<[perl #78716]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78716>. | |
374 | ||
375 | =item * | |
376 | ||
e1165778 Z |
377 | C<PerlIO::via> has been upgraded from 0.10 to 0.11. |
378 | ||
379 | =item * | |
380 | ||
381 | C<POSIX> has been upgraded from 1.22 to 1.23. | |
382 | ||
383 | =item * | |
384 | ||
f295f417 FC |
385 | C<re> has been upgraded from 0.14 to 0.15. |
386 | ||
387 | =item * | |
388 | ||
e1165778 Z |
389 | C<SDBM_File> has been upgraded from 1.08 to 1.09. |
390 | ||
391 | =item * | |
392 | ||
5ebfb99c | 393 | C<Socket> has been upgraded from 1.91 to 1.92. |
b373eab8 FC |
394 | |
395 | It has several new functions for handling IPv6 addresses. | |
396 | ||
397 | =item * | |
398 | ||
b6ae81ab DL |
399 | C<Storable> has been upgraded from 2.24 to 2.25. |
400 | ||
401 | This adds support for serialising code references that contain UTF-8 strings | |
f8109d5c Z |
402 | correctly. The Storable minor version number changed as a result, meaning that |
403 | Storable users who set C<$Storable::accept_future_minor> to a C<FALSE> value | |
b6ae81ab DL |
404 | will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details). |
405 | ||
ca88a729 Z |
406 | Freezing no longer gets confused if the Perl stack gets reallocated |
407 | during freezing | |
408 | L<[perl #80074]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80074>. | |
409 | ||
b6ae81ab DL |
410 | =item * |
411 | ||
e1165778 Z |
412 | C<threads> has been upgraded from 1.81_02 to 1.81_03. |
413 | ||
414 | =item * | |
415 | ||
416 | C<threads::shared> has been upgraded from 1.34 to 1.35. | |
417 | ||
418 | =item * | |
419 | ||
d4238815 FC |
420 | C<Time::HiRes> has been upgraded from 1.9721 to 1.9721_01. |
421 | ||
422 | =item * | |
423 | ||
e1165778 Z |
424 | C<Unicode::Collate> has been upgraded from 0.67 to 0.6801. |
425 | ||
426 | =item * | |
427 | ||
428 | C<Unicode::Normalize> has been upgraded from 1.07 to 1.08. | |
68adb2b0 CBW |
429 | |
430 | =item * | |
431 | ||
59773fc7 | 432 | C<Unicode::UCD> has been upgraded from 0.29 to 0.30. |
3a5c9134 | 433 | |
c2e0289e FC |
434 | =item * |
435 | ||
436 | C<version> has been upgraded from 0.82 to 0.86. | |
437 | ||
e6f1cc4d FC |
438 | =item * |
439 | ||
e1165778 Z |
440 | C<Win32> has been upgraded from 0.39 to 0.41. |
441 | ||
442 | =item * | |
443 | ||
444 | C<XS::APItest> has been upgraded from 0.26 to 0.27. | |
e6f1cc4d | 445 | |
3a5c9134 CBW |
446 | =back |
447 | ||
e1165778 Z |
448 | =head2 Dual-life Modules and Pragmata |
449 | ||
450 | These modules were formerly distributed only in the Perl core | |
f8109d5c Z |
451 | distribution, and are now dual-lifed (meaning they are now also available |
452 | separately on CPAN): | |
e1165778 Z |
453 | |
454 | =over 4 | |
455 | ||
456 | =item * | |
457 | ||
458 | C<autouse> | |
459 | ||
460 | =item * | |
461 | ||
f8109d5c | 462 | C<Devel::SelfStubber> |
e1165778 Z |
463 | |
464 | =item * | |
465 | ||
466 | C<Dumpvalue> | |
467 | ||
468 | =item * | |
469 | ||
470 | C<Env> | |
471 | ||
472 | =item * | |
473 | ||
f8109d5c | 474 | C<File::CheckTree> |
3a5c9134 CBW |
475 | |
476 | =item * | |
477 | ||
f8109d5c | 478 | C<I18N::Collate> |
3a5c9134 CBW |
479 | |
480 | =back | |
481 | ||
482 | =head1 Diagnostics | |
483 | ||
484 | The following additions or changes have been made to diagnostic output, | |
485 | including warnings and fatal error messages. For the complete list of | |
486 | diagnostic messages, see L<perldiag>. | |
487 | ||
3a5c9134 CBW |
488 | =head2 New Diagnostics |
489 | ||
3a5c9134 CBW |
490 | =over 4 |
491 | ||
492 | =item * | |
493 | ||
f8109d5c Z |
494 | There is a new "Closure prototype called" error |
495 | L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>. | |
3a5c9134 CBW |
496 | |
497 | =back | |
498 | ||
499 | =head2 Changes to Existing Diagnostics | |
500 | ||
3a5c9134 CBW |
501 | =over 4 |
502 | ||
503 | =item * | |
504 | ||
c6008483 FC |
505 | The "Found = in conditional" warning that is emitted when a constant is |
506 | assigned to a variable in a condition is now withheld if the constant is | |
507 | actually a subroutine or one generated by C<use constant>, since the value | |
508 | of the constant may not be known at the time the program is written | |
509 | L<[perl #77762]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77762>. | |
3a5c9134 CBW |
510 | |
511 | =back | |
512 | ||
3a5c9134 CBW |
513 | =head1 Configuration and Compilation |
514 | ||
3a5c9134 CBW |
515 | =over 4 |
516 | ||
517 | =item * | |
518 | ||
51bed910 Z |
519 | The C<Encode> module can now (once again) be included in a static Perl |
520 | build. The special-case handling for this situation got broken in Perl | |
521 | 5.11.0, and has now been repaired. | |
522 | ||
3a5c9134 CBW |
523 | =back |
524 | ||
525 | =head1 Testing | |
526 | ||
3a5c9134 CBW |
527 | =over 4 |
528 | ||
529 | =item * | |
530 | ||
f8109d5c Z |
531 | Tests for C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<IPC::Open3>, |
532 | C<NDBM_File>, C<ODBM_File>, C<Opcode>, C<PerlIO::encoding>, C<SDBM_File>, | |
533 | and C<Storable> now use the L<Test::More> framework. | |
3a5c9134 CBW |
534 | |
535 | =back | |
536 | ||
537 | =head1 Platform Support | |
538 | ||
3a5c9134 CBW |
539 | =head2 Platform-Specific Notes |
540 | ||
3a5c9134 CBW |
541 | =over 4 |
542 | ||
085d0904 | 543 | =item NetBSD |
3a5c9134 | 544 | |
085d0904 FC |
545 | The NetBSD hints file has been changed to make the system's malloc the |
546 | default. | |
3a5c9134 | 547 | |
fb3a2d89 Z |
548 | =item Windows |
549 | ||
550 | The option to use an externally-supplied C<crypt()>, or to build with no | |
551 | C<crypt()> at all, has been removed. Perl supplies its own C<crypt()> | |
552 | implementation for Windows, and the political situation that required | |
553 | this part of the distribution to sometimes be omitted is long gone. | |
554 | ||
3a5c9134 CBW |
555 | =back |
556 | ||
557 | =head1 Internal Changes | |
558 | ||
3a5c9134 CBW |
559 | =over 4 |
560 | ||
561 | =item * | |
562 | ||
f8109d5c Z |
563 | The C<mg_findext()> and C<sv_unmagicext()> functions have been added to the API. |
564 | They allow extension authors to find and remove magic attached to | |
833f1b93 | 565 | scalars based on both the magic type and the magic virtual table, similar to how |
f8109d5c | 566 | C<sv_magicext()> attaches magic of a certain type and with a given virtual table |
833f1b93 FR |
567 | to a scalar. This eliminates the need for extensions to walk the list of |
568 | C<MAGIC> pointers of an C<SV> to find the magic that belongs to them. | |
3a5c9134 | 569 | |
c61b6d0f FC |
570 | =item * |
571 | ||
f8109d5c Z |
572 | The C<parse_fullexpr()>, C<parse_listexpr()>, C<parse_termexpr()> and |
573 | C<parse_arithexpr()> functions have been added to the API. They perform | |
574 | recursive-descent parsing of expressions at various precedence levels. | |
575 | They are expected to be used by syntax plugins. | |
c61b6d0f | 576 | |
3a5c9134 CBW |
577 | =back |
578 | ||
579 | =head1 Selected Bug Fixes | |
580 | ||
3a5c9134 CBW |
581 | =over 4 |
582 | ||
583 | =item * | |
584 | ||
88e9444c NC |
585 | C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving |
586 | identically to C<use 5.12.0;>. Previously, C<require> in a C<BEGIN> block | |
587 | was erroneously executing the C<use feature ':5.12.0'> and | |
588 | C<use strict; use warnings;> behaviour, which only C<use> was documented to | |
b373eab8 FC |
589 | provide |
590 | L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>. | |
591 | ||
592 | =item * | |
593 | ||
594 | C<use 5.42> | |
595 | L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>, | |
596 | C<use 6> and C<no 5> no longer leak memory. | |
597 | ||
598 | =item * | |
599 | ||
600 | C<eval "BEGIN{die}"> no longer leaks memory on non-threaded builds. | |
3a5c9134 | 601 | |
1428a560 FC |
602 | =item * |
603 | ||
604 | PerlIO no longer crashes when called recursively, e.g., from a signal | |
605 | handler. Now it just leaks memory | |
606 | L<[perl #75556]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75556>. | |
607 | ||
11cd2234 FC |
608 | =item * |
609 | ||
610 | Defining a constant with the same name as one of perl's special blocks | |
611 | (e.g., INIT) stopped working in 5.12.0, but has now been fixed | |
612 | L<[perl #78634]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78634>. | |
613 | ||
e3ef43a5 FC |
614 | =item * |
615 | ||
616 | A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used | |
617 | to be stringified, even if the hash was tied | |
618 | L<[perl #79178]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79178>. | |
619 | ||
3ad6135d FC |
620 | =item * |
621 | ||
3ad6135d FC |
622 | A closure containing an C<if> statement followed by a constant or variable |
623 | is no longer treated as a constant | |
624 | L<[perl #63540]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63540>. | |
625 | ||
4d4ca6a5 FC |
626 | =item * |
627 | ||
628 | Calling a closure prototype (what is passed to an attribute handler for a | |
7cdf3308 FC |
629 | closure) now results in a "Closure prototype called" error message instead |
630 | of a crash | |
4d4ca6a5 FC |
631 | L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>. |
632 | ||
085d0904 FC |
633 | =item * |
634 | ||
635 | A regular expression optimisation would sometimes cause a match with a | |
636 | C<{n,m}> quantifier to fail when it should match | |
637 | L<[perl #79152]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79152>. | |
638 | ||
20db7501 KW |
639 | =item * |
640 | ||
f8109d5c | 641 | What has become known as the "Unicode Bug" is mostly resolved in this release. |
20db7501 KW |
642 | Under C<use feature 'unicode_strings'>, the internal storage format of a |
643 | string no longer affects the external semantics. There are two known | |
644 | exceptions. User-defined case changing functions, which are planned to | |
645 | be deprecated in 5.14, require utf8-encoded strings to function; and the | |
646 | character C<LATIN SMALL LETTER SHARP S> in regular expression | |
647 | case-insensitive matching has a somewhat different set of bugs depending | |
648 | on the internal storage format. Case-insensitive matching of all | |
649 | characters that have multi-character matches, as this one does, is | |
650 | problematical in Perl. | |
651 | L<[perl #58182]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=58182>. | |
652 | ||
70bfa48a FC |
653 | =item * |
654 | ||
655 | Mentioning a read-only lexical variable from the enclosing scope in a | |
f8109d5c | 656 | string C<eval> no longer causes the variable to become writable |
70bfa48a FC |
657 | L<[perl #19135]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=19135>. |
658 | ||
f853e70a FC |
659 | =item * |
660 | ||
661 | C<state> can now be used with attributes. It used to mean the same thing as | |
662 | C<my> if attributes were present | |
663 | L<[perl #68658]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68658>. | |
664 | ||
37079308 FC |
665 | =item * |
666 | ||
667 | Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in | |
668 | the "Use of uninitialized value in numeric gt" warning when C<$a> is | |
669 | undefined (since it is not part of the C<E<gt>> expression, but the operand | |
670 | of the C<@>) | |
671 | L<[perl #72090]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72090>. | |
672 | ||
4c9d53d5 FC |
673 | =item * |
674 | ||
675 | C<require> no longer causes C<caller> to return the wrong file name for | |
676 | the scope that called C<require> and other scopes higher up that had the | |
677 | same file name | |
678 | L<[perl #68712]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68712>. | |
679 | ||
0c7420e7 FC |
680 | =item * |
681 | ||
7cdf3308 | 682 | The ref types in the typemap for XS bindings now support magical variables |
0c7420e7 FC |
683 | L<[perl #72684]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72684>. |
684 | ||
460c4bfb FC |
685 | =item * |
686 | ||
687 | Match variables (e.g., C<$1>) no longer persist between calls to a sort | |
688 | subroutine | |
689 | L<[perl #76026]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76026>. | |
690 | ||
26de4ac8 FC |
691 | =item * |
692 | ||
f8109d5c | 693 | The C<B> module was returning C<B::OP>s instead of C<B::LOGOP>s for C<entertry> |
26de4ac8 | 694 | L<[perl #80622]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80622>. |
26de4ac8 FC |
695 | This was due to a bug in the perl core, not in C<B> itself. |
696 | ||
ab7fb400 FC |
697 | =item * |
698 | ||
699 | Some numeric operators were converting integers to floating point, | |
700 | resulting in loss of precision on 64-bit platforms | |
701 | L<[perl #77456]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77456>. | |
702 | ||
836d5805 Z |
703 | =item * |
704 | ||
705 | The fallback behaviour of overloading on binary operators was asymmetric | |
706 | L<[perl #71286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=71286>. | |
707 | ||
3a5c9134 CBW |
708 | =back |
709 | ||
3a5c9134 CBW |
710 | =head1 Acknowledgements |
711 | ||
712 | XXX The list of people to thank goes here. | |
713 | ||
714 | =head1 Reporting Bugs | |
715 | ||
716 | If you find what you think is a bug, you might check the articles | |
717 | recently posted to the comp.lang.perl.misc newsgroup and the perl | |
718 | bug database at http://rt.perl.org/perlbug/ . There may also be | |
719 | information at http://www.perl.org/ , the Perl Home Page. | |
720 | ||
721 | If you believe you have an unreported bug, please run the L<perlbug> | |
722 | program included with your release. Be sure to trim your bug down | |
723 | to a tiny but sufficient test case. Your bug report, along with the | |
724 | output of C<perl -V>, will be sent off to perlbug@perl.org to be | |
725 | analysed by the Perl porting team. | |
726 | ||
727 | If the bug you are reporting has security implications, which make it | |
728 | inappropriate to send to a publicly archived mailing list, then please send | |
729 | it to perl5-security-report@perl.org. This points to a closed subscription | |
730 | unarchived mailing list, which includes all the core committers, who be able | |
731 | to help assess the impact of issues, figure out a resolution, and help | |
732 | co-ordinate the release of patches to mitigate or fix the problem across all | |
733 | platforms on which Perl is supported. Please only use this address for | |
734 | security issues in the Perl core, not for modules independently | |
735 | distributed on CPAN. | |
736 | ||
737 | =head1 SEE ALSO | |
738 | ||
739 | The F<Changes> file for an explanation of how to view exhaustive details | |
740 | on what changed. | |
741 | ||
742 | The F<INSTALL> file for how to build Perl. | |
743 | ||
744 | The F<README> file for general stuff. | |
745 | ||
746 | The F<Artistic> and F<Copying> files for copyright information. | |
747 | ||
748 | =cut |