Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
541cb22c | 3 | =for comment |
7f28d7ed | 4 | This has been completed up to 5dca8ed9d28, except for |
d6b99bf4 | 5 | b0f2e9e nwclark Fix two bugs related to pod files outside of pod/ (important enough?) |
7f28d7ed DR |
6 | 43d9ecf jpeacock Set all version object math ops to noop |
7 | f300909 smueller EU::ParseXS: Silence warning (probably unnecessary) | |
541cb22c | 8 | |
44691e6f AB |
9 | =head1 NAME |
10 | ||
0aaeb177 SH |
11 | [ this is a template for a new perldelta file. Any text flagged as |
12 | XXX needs to be processed before release. ] | |
760696b8 | 13 | |
0aaeb177 | 14 | perldelta - what is new for perl v5.15.6 |
062678b2 | 15 | |
0aaeb177 | 16 | =head1 DESCRIPTION |
ad32999b | 17 | |
0aaeb177 SH |
18 | This document describes differences between the 5.15.5 release and |
19 | the 5.15.6 release. | |
ad32999b | 20 | |
0aaeb177 SH |
21 | If you are upgrading from an earlier release such as 5.15.4, first read |
22 | L<perl5155delta>, which describes differences between 5.15.4 and | |
23 | 5.15.5. | |
ad32999b | 24 | |
0aaeb177 | 25 | =head1 Notice |
ad32999b | 26 | |
0aaeb177 | 27 | XXX Any important notices here |
ad32999b | 28 | |
0aaeb177 | 29 | =head1 Core Enhancements |
a3f52e2e | 30 | |
0aaeb177 SH |
31 | XXX New core language features go here. Summarise user-visible core language |
32 | enhancements. Particularly prominent performance optimisations could go | |
33 | here, but most should go in the L</Performance Enhancements> section. | |
a3f52e2e | 34 | |
0aaeb177 | 35 | [ List each enhancement as a =head2 entry ] |
6d110ad0 | 36 | |
61f966e7 FC |
37 | =head2 C<__SUB__> |
38 | ||
39 | The new C<__SUB__> token, available under the "current_sub" feature (see | |
40 | L<feature>) or C<use v5.15>, returns a reference to the current subroutine, | |
41 | making it easier to write recursive closures. | |
42 | ||
d1fb015b FC |
43 | =head2 New option for the debugger's B<t> command |
44 | ||
45 | The B<t> command in the debugger, which toggles tracing mode, now accepts a | |
46 | numerical argument that determines how many levels of subroutine calls to | |
47 | trace. | |
48 | ||
7e7629fa FC |
49 | =head2 Return value of C<tied> |
50 | ||
51 | The value returned by C<tied> on a tied variable is now the actual scalar | |
52 | that holds the object to which the variable is tied. This allows ties to | |
53 | be weakened with C<Scalar::Util::weaken(tied $tied_variable)>. | |
54 | ||
7f28d7ed DR |
55 | =head2 Lvalue C<scalar> |
56 | ||
57 | C<scalar> can now be used as an lvalue. You might consider this a new | |
58 | feature (which is why it is listed in this section), but the author of | |
59 | the change considered it a bug fix, since C<scalar> is only supposed to be | |
60 | setting scalar context, not changing lvalueness [perl #24346]. | |
61 | ||
e3c71926 | 62 | =head1 Security |
6d110ad0 | 63 | |
0aaeb177 SH |
64 | XXX Any security-related notices go here. In particular, any security |
65 | vulnerabilities closed should be noted here rather than in the | |
66 | L</Selected Bug Fixes> section. | |
6d110ad0 | 67 | |
6d91e957 KW |
68 | =head2 C<is_utf8_char()> |
69 | ||
70 | The XS-callable function C<is_utf8_char()> when presented with malformed | |
71 | UTF-8 input can read up to 12 bytes beyond the end of the string. This | |
72 | cannot be fixed without changing its API. It is not called from CPAN. | |
73 | The documentation for it now describes how to use it safely. | |
74 | ||
75 | =head2 Other C<is_utf8_foo()> functions, as well as C<utf8_to_foo()>, etc. | |
76 | ||
77 | Most of the other XS-callable functions that take UTF-8 encoded input | |
78 | implicitly assume that the UTF-8 is valid (not malformed) in regards to | |
79 | buffer length. Do not do things such as change a character's case or | |
80 | see if it is alphanumeric without first being sure that it is valid | |
81 | UTF-8. This can be safely done for a whole string by using one of the | |
82 | functions C<is_utf8_string()>, C<is_utf8_string_loc()>, and | |
83 | C<is_utf8_string_loclen()>. | |
6d110ad0 | 84 | |
e3c71926 | 85 | =head1 Incompatible Changes |
6d110ad0 | 86 | |
0aaeb177 | 87 | XXX For a release on a stable branch, this section aspires to be: |
ad32999b | 88 | |
0aaeb177 SH |
89 | There are no changes intentionally incompatible with 5.XXX.XXX |
90 | If any exist, they are bugs and reports are welcome. | |
ad32999b | 91 | |
0aaeb177 | 92 | [ List each incompatible change as a =head2 entry ] |
ad32999b | 93 | |
7f28d7ed DR |
94 | =head2 C<use I<VERSION>> |
95 | ||
96 | As of this release, version declarations like C<use v5.16> now disable all | |
97 | features before enabling the new feature bundle. This means that the | |
98 | following holds true: | |
99 | ||
100 | use 5.016; | |
101 | # 5.16 features enabled here | |
102 | use 5.014; | |
103 | # 5.16 features disabled here | |
104 | ||
105 | C<use v5.12> and higher continue to enable strict, but explicit | |
106 | C<use strict> and C<no strict> now override the version declaration, even | |
107 | when they come first: | |
108 | ||
109 | no strict; | |
110 | use 5.012; | |
111 | # no strict here | |
112 | ||
113 | There is a new ":default" feature bundle, that represents the set of | |
114 | features enabled before any version declaration or C<use feature> has been | |
115 | seen. Version declarations below 5.10 now enable the ":default" feature | |
116 | set. This does not actually change the behaviour of C<use v5.8>, because | |
117 | features added to the ":default" set are those that were traditionally | |
118 | enabled by default, before they could be turned off. | |
119 | ||
120 | C<$[> is now disabled under C<use v5.16>. It is part of the default | |
121 | feature set and can be turned on or off explicitly | |
122 | with C<use feature 'array_base'>. | |
123 | ||
124 | =head2 C<UNIVERSAL::VERSION> | |
125 | ||
126 | The change to C<UNIVERSAL::VERSION> in 5.15.2 has been reverted. It now | |
127 | returns a stringified version object once more. | |
128 | ||
66008486 FC |
129 | =head2 C<substr> lvalue revamp |
130 | ||
131 | When C<substr> is called in lvalue or potential lvalue context with two or | |
132 | three arguments, a special lvalue scalar is returned that modifies the | |
133 | original string (the first argument) when assigned to. | |
134 | ||
135 | Previously, the offsets (the second and third arguments) passed to | |
136 | C<substr> would be converted immediately to match the string, negative | |
137 | offsets being translated to positive and offsets beyond the end of the | |
138 | string being truncated. | |
139 | ||
140 | Now, the offsets are recorded without modification in the special lvalue | |
141 | scalar that is returned, and the original string is not even looked at by | |
142 | C<substr> itself, but only when the returned lvalue is read or modified. | |
143 | ||
144 | These changes result in several incompatible changes and bug fixes: | |
145 | ||
146 | =over | |
147 | ||
148 | =item * | |
149 | ||
150 | If the original string changes length after the call to C<substr> but | |
151 | before assignment to its return value, negative offsets will remember | |
152 | their position from the end of the string, affecting code like this: | |
153 | ||
154 | my $string = "string"; | |
155 | my $lvalue = \substr $string, -4, 2; | |
156 | print $lvalue, "\n"; # prints "ri" | |
157 | $string = "bailing twine"; | |
158 | print $lvalue, "\n"; # prints "wi"; used to print "il" | |
159 | ||
160 | The same thing happens with an omitted third argument. The returned lvalue | |
161 | will always extend to the end of the string, even if the string becomes | |
162 | longer. | |
163 | ||
164 | =item * | |
165 | ||
166 | Tied (and otherwise magical) variables are no longer exempt from the | |
167 | "Attempt ot use reference as lvalue in substr" warning. | |
168 | ||
169 | =item * | |
170 | ||
171 | That warning now occurs when the returned lvalue is assigned to, not when | |
172 | C<substr> itself is called. This only makes a difference if the return | |
173 | value of C<substr> is referenced and assigned to later. | |
174 | ||
175 | =item * | |
176 | ||
177 | The order in which "uninitialized" warnings occur for arguments to | |
178 | C<substr> has changed. | |
179 | ||
180 | =item * | |
181 | ||
182 | Passing a substring of a read-only value or a typeglob to a function (potential lvalue context) no longer causes an immediate "Can't coerce" or "Modification of a read-only value" error. That error only occurs if and | |
183 | when the value passed is assigned to. | |
184 | ||
7e7629fa FC |
185 | The same thing happens with the "substr outside of string" error. If the |
186 | lvalue is only read, not written to, it is now just a warning, as with | |
187 | rvalue C<substr>. | |
66008486 FC |
188 | |
189 | =item * | |
190 | ||
191 | C<substr> assignments no longer call FETCH twice if the first argument is a | |
192 | tied variable, but just once. | |
193 | ||
194 | =back | |
195 | ||
196 | It was impossible to fix all the bugs without an incompatible change, and | |
197 | the behaviour of negative offsets was never specified, so the change was | |
198 | deemed acceptable. | |
199 | ||
d6b99bf4 FC |
200 | =head2 Return value of C<eval> |
201 | ||
202 | C<eval> returns C<undef> in scalar context or an empty list in list context | |
203 | when there is a run-time error. For syntax errors (when C<eval> is passed | |
204 | a string), in list context it used to return a list containing a single | |
205 | undefined element. Now it returns an empty list in list context for all | |
206 | errors [perl #80630]. | |
207 | ||
7f28d7ed DR |
208 | =head2 Anonymous handles |
209 | ||
210 | Automatically generated file handles are now named __ANONIO__ when the | |
211 | variable name cannot be determined, rather than $__ANONIO__. | |
212 | ||
541cb22c FC |
213 | =head2 XS API tweak |
214 | ||
215 | The C<newCONSTSUB_flags> C-level function, added in 5.15.4, now has a | |
216 | C<len> parameter. | |
217 | ||
e3c71926 | 218 | =head1 Deprecations |
6d110ad0 | 219 | |
0aaeb177 SH |
220 | XXX Any deprecated features, syntax, modules etc. should be listed here. |
221 | In particular, deprecated modules should be listed here even if they are | |
222 | listed as an updated module in the L</Modules and Pragmata> section. | |
ae92a9ae | 223 | |
0aaeb177 | 224 | [ List each deprecation as a =head2 entry ] |
ae92a9ae | 225 | |
e3c71926 | 226 | =head1 Performance Enhancements |
6d110ad0 | 227 | |
0aaeb177 SH |
228 | XXX Changes which enhance performance without changing behaviour go here. There |
229 | may well be none in a stable release. | |
230 | ||
231 | [ List each enhancement as a =item entry ] | |
232 | ||
e3c71926 | 233 | =over 4 |
6d110ad0 FC |
234 | |
235 | =item * | |
236 | ||
679b54e7 FC |
237 | Perl 5.12.0 sped up the destruction of objects whose classes define empty |
238 | C<DESTROY> methods (to prevent autoloading), simply by not calling such | |
239 | empty methods. This release takes this optimisation a step further, by not | |
240 | calling any C<DESTROY> method that begins with an C<return> statement. | |
241 | This can be useful for destructors that are only used for debugging: | |
242 | ||
243 | use constant DEBUG => 1; | |
244 | sub DESTROY { return unless DEBUG; ... } | |
245 | ||
246 | Constant-folding will reduce the first statement to C<return;> if DEBUG is | |
247 | set to 0, triggering this optimisation. | |
6d110ad0 | 248 | |
d1fb015b FC |
249 | =item * |
250 | ||
251 | Assign to a variable that holds a typeglob or copy-on-write scalar is now | |
252 | much faster. Previously the typeglob would be stringified or the | |
253 | copy-on-write scalar would be copied before being clobbered. | |
254 | ||
7e7629fa FC |
255 | =item * |
256 | ||
257 | Assignment to a substring in void context is now more than twice its | |
258 | previous speed. Instead of creating and returning a special lvalue scalar | |
259 | that is then assigned to, C<substr> modifies the original string itself. | |
260 | ||
e3c71926 | 261 | =back |
6d110ad0 | 262 | |
e3c71926 | 263 | =head1 Modules and Pragmata |
6d110ad0 | 264 | |
0aaeb177 SH |
265 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
266 | go here. If Module::CoreList is updated, generate an initial draft of the | |
267 | following sections using F<Porting/corelist-perldelta.pl>, which prints stub | |
268 | entries to STDOUT. Results can be pasted in place of the '=head2' entries | |
269 | below. A paragraph summary for important changes should then be added by hand. | |
270 | In an ideal world, dual-life modules would have a F<Changes> file that could be | |
271 | cribbed. | |
272 | ||
273 | [ Within each section, list entries as a =item entry ] | |
274 | ||
e3c71926 | 275 | =head2 New Modules and Pragmata |
6d110ad0 | 276 | |
e3c71926 | 277 | =over 4 |
6d110ad0 FC |
278 | |
279 | =item * | |
280 | ||
0aaeb177 | 281 | XXX |
6d110ad0 FC |
282 | |
283 | =back | |
284 | ||
e3c71926 | 285 | =head2 Updated Modules and Pragmata |
6d110ad0 | 286 | |
e3c71926 | 287 | =over 4 |
6d110ad0 FC |
288 | |
289 | =item * | |
290 | ||
f8c9502f CBW |
291 | L<Archive::Tar> has been upgraded from version 1.80 to version 1.82. |
292 | ||
293 | Adjustments to handle files >8gb (>0777777777777 octal) and a feature to | |
294 | return the MD5SUM of files in the archive. | |
a3f52e2e | 295 | |
87b9431e CBW |
296 | =item * |
297 | ||
74c26f06 CBW |
298 | L<AutoLoader> has been upgraded from version 5.71 to version 5.72. |
299 | ||
300 | =item * | |
301 | ||
8cea0f87 CBW |
302 | L<B::Debug> has been upgraded from version 1.16 to version 1.17. |
303 | ||
304 | =item * | |
305 | ||
be4a9ab3 | 306 | L<B::Deparse> has been upgraded from version 1.09 to version 1.10. |
679b54e7 | 307 | |
7f28d7ed DR |
308 | Various constructs that used to be deparsed incorrectly have been fixed: |
309 | ||
310 | =over | |
311 | ||
312 | =item C<sort(foo(bar))> | |
313 | ||
314 | C<sort foo(bar)>, how it used to deparse, makes foo the sort routine, | |
315 | rather than a regular function call. | |
316 | ||
317 | =item Keys and values in C<%^H> | |
318 | ||
319 | Undefined values in the hint hash were being deparsed as empty strings. | |
320 | Whenever the hint hash changed, all undefined values, even those | |
321 | unmodified, were being printed. | |
322 | ||
323 | Special characters, such as quotation marks, were not being escaped | |
324 | properly. | |
325 | ||
326 | Some values used to be omitted if, for instance, a key was the same as a | |
327 | previous value and vice versa. | |
328 | ||
329 | =item "method BLOCK" syntax | |
330 | ||
331 | C<method { $expr }> used to be deparsed as something like | |
332 | C<< do{ $expr }->method >>, but the latter puts the $expr in scalar | |
333 | context, whereas the former puts in list context. | |
334 | ||
335 | =item C<do +{}> and C<do({})> | |
336 | ||
337 | These are both variants of do-file syntax, but were being deparsed as | |
338 | do-blocks. | |
339 | ||
340 | =item Keywords that do not follow the llafr | |
341 | ||
342 | Keywords like C<return> and C<last> that do not follow the | |
343 | looks-like-a-function rule are now deparsed correctly with parentheses in | |
344 | the right place. | |
345 | ||
346 | Similarly, C<not>, which I<does> follow the llafr, was being deparsed as | |
347 | though it does not. | |
348 | ||
349 | =item C<=~> | |
350 | ||
351 | In various cases, B::Deparse started adding a spurious C<$_ =~> before the | |
352 | right-hand side in Perl 5.14; e.g., C<< "" =~ <$a> >> would become | |
353 | C<< "" =~ ($_ =~ <$a>) >>. | |
354 | ||
355 | =item C<open local *FH> | |
356 | ||
357 | C<open>, C<pipe> and other functions that autovivify handles used to omit | |
358 | C<local *> from C<local *FH>. | |
359 | ||
360 | =item Negated single-letter subroutine calls | |
361 | ||
362 | Negated subroutine calls like C<- f()> and C<-(f())> were being deparsed | |
363 | as file test operators. | |
364 | ||
365 | =item C<&{&}> | |
366 | ||
367 | C<&{&}> and C<& &>, which are calls to the subroutine named "&", believe it | |
368 | or not, were being deparsed as C<&&>. | |
369 | ||
370 | =back | |
679b54e7 FC |
371 | |
372 | =item * | |
373 | ||
9505dd85 | 374 | L<Compress::Raw::Zlib> has been upgraded from version 2.042 to version 2.045. |
87b9431e | 375 | |
7e700369 CBW |
376 | =item * |
377 | ||
6475ddc2 | 378 | L<Compress::Raw::Bzip2> has been upgraded from version 2.042 to version 2.045. |
7e700369 | 379 | |
dc7edc5c CBW |
380 | =item * |
381 | ||
1d8dd5fc CBW |
382 | L<CPAN::Meta::YAML> has been upgraded from version 0.004 to version 0.005. |
383 | ||
384 | =item * | |
385 | ||
9e87a279 CBW |
386 | L<CPANPLUS> has been upgraded from version 0.9112 to version 0.9113. |
387 | ||
388 | =item * | |
389 | ||
be4a9ab3 | 390 | L<Data::Dumper> has been upgraded from version 2.134 to version 2.135. |
61f966e7 FC |
391 | |
392 | The XS implementation has been updated to account for the Unicode symbol | |
393 | changes in Perl 5.15.4. It also knows how to output typeglobs with nulls | |
394 | in their names. | |
395 | ||
396 | =item * | |
397 | ||
e39652ea CBW |
398 | L<Digest::SHA> has been upgraded from version 5.63 to version 5.70. |
399 | ||
400 | Added BITS mode to addfile method and shasum which makes partial-byte inputs | |
401 | now possible via files/STDIN and allows shasum to check all 8074 NIST Msg vectors, | |
402 | where previously special programming was required to do this. | |
403 | ||
404 | =item * | |
405 | ||
7f28d7ed DR |
406 | L<Exporter> has been upgraded from version 5.65 to version 5.66. |
407 | ||
408 | It no longer tries to localise C<$_> unnecessarily. | |
409 | ||
410 | =item * | |
411 | ||
ac616993 CBW |
412 | L<ExtUtils::ParseXS> has been upgraded from version 3.05 to version 3.07. |
413 | ||
414 | =item * | |
415 | ||
090349ce | 416 | L<IO::Compress::Base> has been upgraded from version 2.042 to version 2.045. |
08ad9465 CBW |
417 | |
418 | Added zipdetails utility. | |
dc7edc5c | 419 | |
7788a270 CBW |
420 | =item * |
421 | ||
4345d05b CBW |
422 | L<Locale::Codes> has been upgraded from version 3.18 to version 3.20. |
423 | ||
424 | The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now support retired codes. | |
425 | All codesets may be specified by a constant or by their name now. Previously, | |
426 | they were specified only by a constant. | |
427 | The alias_code function exists for backward compatibility. It has been replaced by rename_country_code. | |
428 | The alias_code function will be removed sometime after September, 2013. | |
429 | All work is now done in the central module (Locale::Codes). Previously, some was still done in the | |
430 | wrapper modules (Locale::Codes::*) but that is gone now. | |
431 | Added Language Family codes (langfam) as defined in ISO 639-5. | |
432 | ||
433 | =item * | |
434 | ||
b42ff875 CBW |
435 | L<Module::Loaded> has been uprgaded from version 0.06 to version 0.08. |
436 | ||
437 | =item * | |
438 | ||
a71d67b1 CBW |
439 | L<Pod::LaTeX> has been upgraded from version 0.59 to version 0.60. |
440 | ||
441 | Added another LaTeX escape: --- => -{}-{}- | |
442 | ||
443 | Pod::LaTeX doesn't handle -- in PODs specially, passing it directly to | |
444 | LaTeX, which then proceeds to replace it with a single -. This patch | |
445 | replaces ----- with -{}-{}-{}-{}- | |
446 | ||
447 | =item * | |
448 | ||
be4a9ab3 | 449 | L<POSIX> has been upgraded from version 1.26 to version 1.27. |
7e7629fa FC |
450 | |
451 | It no longer produces a "Constant subroutine TCSANOW redefined" warning on | |
452 | Windows. | |
453 | ||
454 | XXX When did it start producing that warning? Was it post-5.15.5? Even if | |
455 | it was not, adding a note will help whoever compiles perl5160delta. | |
456 | ||
457 | =item * | |
458 | ||
37b1de1b | 459 | L<Socket> has been upgraded from version 1.94_02 to version 1.97. |
c2654555 CBW |
460 | |
461 | =item * | |
462 | ||
85ca3be7 CBW |
463 | L<threads> has been upgraded from version 1.85 to version 1.86. |
464 | ||
465 | =item * | |
466 | ||
65ae8d99 | 467 | L<Unicode::Collate> has been upgraded from version 0.85 to version 0.87. |
7788a270 CBW |
468 | |
469 | Tailored compatibility ideographs as well as unified ideographs for | |
470 | the locales: ja, ko, zh__big5han, zh__gb2312han, zh__pinyin, zh__stroke. | |
471 | ||
65ae8d99 CBW |
472 | Now Locale/*.pl files are searched in @INC. |
473 | ||
a3e88ad7 JP |
474 | =item * |
475 | ||
be4a9ab3 | 476 | L<UNIVERSAL> has been upgraded from version 1.10 to version 1.11. |
a3e88ad7 JP |
477 | |
478 | Documentation change clarifies return values from UNIVERSAL::VERSION. | |
479 | ||
0aaeb177 | 480 | =back |
6138a722 | 481 | |
0aaeb177 | 482 | =head2 Removed Modules and Pragmata |
6138a722 | 483 | |
0aaeb177 | 484 | =over 4 |
be539103 | 485 | |
a47fb3fe CBW |
486 | =item * |
487 | ||
7f28d7ed DR |
488 | Changing the case of a UTF-8 encoded string under C<use locale> now |
489 | gives better, but still imperfect, results. Previously, such a string | |
490 | would entirely lose locale semantics and silently be treated as Unicode. | |
491 | Now, the code points that are less than 256 are treated with locale | |
492 | rules, while those above 255 are, of course, treated as Unicode. See | |
493 | L<perlfunc/lc> for more details, including the deficiencies of this | |
494 | scheme. | |
a3f52e2e | 495 | |
0aaeb177 | 496 | =back |
a3f52e2e | 497 | |
0aaeb177 | 498 | =head1 Documentation |
a3f52e2e | 499 | |
0aaeb177 SH |
500 | XXX Changes to files in F<pod/> go here. Consider grouping entries by |
501 | file and be sure to link to the appropriate page, e.g. L<perlfunc>. | |
a3f52e2e | 502 | |
0aaeb177 | 503 | =head2 New Documentation |
ad32999b | 504 | |
0aaeb177 | 505 | XXX Changes which create B<new> files in F<pod/> go here. |
ad32999b | 506 | |
0aaeb177 | 507 | =head3 L<XXX> |
ad32999b | 508 | |
0aaeb177 | 509 | XXX Description of the purpose of the new file here |
6138a722 | 510 | |
0aaeb177 | 511 | =head2 Changes to Existing Documentation |
6138a722 | 512 | |
0aaeb177 SH |
513 | XXX Changes which significantly change existing files in F<pod/> go here. |
514 | However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics> | |
515 | section. | |
a47fb3fe | 516 | |
7687d286 | 517 | =head3 L<perlsec/Laundering and Detecting Tainted Data> |
a47fb3fe | 518 | |
0aaeb177 | 519 | =over 4 |
7ef25837 | 520 | |
6d110ad0 FC |
521 | =item * |
522 | ||
7687d286 KW |
523 | The example function for checking for taintedness contained a subtle |
524 | error. C<$@> needs to be localized to prevent its changing this | |
525 | global's value outside the function. The preferred method to check for | |
526 | this, though, remains to use L<Scalar::Util/tainted>. | |
6d110ad0 FC |
527 | |
528 | =back | |
529 | ||
e3c71926 FR |
530 | =head1 Diagnostics |
531 | ||
532 | The following additions or changes have been made to diagnostic output, | |
533 | including warnings and fatal error messages. For the complete list of | |
534 | diagnostic messages, see L<perldiag>. | |
6d110ad0 | 535 | |
0aaeb177 SH |
536 | XXX New or changed warnings emitted by the core's C<C> code go here. Also |
537 | include any changes in L<perldiag> that reconcile it to the C<C> code. | |
6138a722 | 538 | |
0aaeb177 SH |
539 | [ Within each section, list entries as a =item entry that links to perldiag, |
540 | e.g. | |
6138a722 | 541 | |
0aaeb177 | 542 | =item * |
6138a722 | 543 | |
0aaeb177 SH |
544 | L<Invalid version object|perldiag/"Invalid version object"> |
545 | ] | |
6138a722 | 546 | |
0aaeb177 | 547 | =head2 New Diagnostics |
828d6195 | 548 | |
0aaeb177 | 549 | XXX Newly added diagnostic messages go here |
83307084 | 550 | |
0aaeb177 | 551 | =head3 New Errors |
d39de893 | 552 | |
3432e5a1 | 553 | =over 4 |
39afdc5a CBW |
554 | |
555 | =item * | |
556 | ||
0aaeb177 | 557 | XXX L<message|perldiag/"message"> |
6138a722 | 558 | |
e3c71926 | 559 | =back |
7b8e5ef0 | 560 | |
0aaeb177 | 561 | =head3 New Warnings |
91710846 | 562 | |
e3c71926 | 563 | =over 4 |
91710846 DG |
564 | |
565 | =item * | |
566 | ||
0aaeb177 | 567 | XXX L<message|perldiag/"message"> |
f81e39ef | 568 | |
e3c71926 | 569 | =back |
a2fa999d | 570 | |
0aaeb177 SH |
571 | =head2 Changes to Existing Diagnostics |
572 | ||
573 | XXX Changes (i.e. rewording) of diagnostic messages go here | |
bd65daab | 574 | |
e3c71926 | 575 | =over 4 |
bd65daab | 576 | |
3f2cb5bf S |
577 | =item * |
578 | ||
18fbfe8d FC |
579 | Redefinition warnings for constant subroutines used to be mandatory, even |
580 | occurring under C<no warnings>. Now they respect the L<warnings> pragma. | |
b420b12a | 581 | |
61f966e7 FC |
582 | =item * |
583 | ||
584 | The "Attempt to free non-existent shared string" has had the spelling of | |
585 | "non-existent" corrected to "nonexistent". It was already listed with the | |
586 | correct spelling in L<perldiag>. | |
587 | ||
66008486 FC |
588 | =item * |
589 | ||
590 | The 'Use of "foo" without parentheses is ambiguous' warning has been | |
591 | extended to apply also to user-defined subroutines with a (;$) prototype, | |
592 | and not just to built-in functions. | |
593 | ||
3432e5a1 | 594 | =back |
b420b12a | 595 | |
0aaeb177 | 596 | =head1 Utility Changes |
9cfd094e | 597 | |
0aaeb177 SH |
598 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go |
599 | here. Most of these are built within the directories F<utils> and F<x2p>. | |
95f7e41f | 600 | |
0aaeb177 SH |
601 | [ List utility changes as a =head3 entry for each utility and =item |
602 | entries for each change | |
603 | Use L<XXX> with program names to get proper documentation linking. ] | |
95f7e41f | 604 | |
08ad9465 | 605 | =head3 L<zipdetails> |
d6cf2367 | 606 | |
e3c71926 | 607 | =over 4 |
b53e16ae FC |
608 | |
609 | =item * | |
610 | ||
08ad9465 CBW |
611 | L<zipdetails> displays information about the internal record structure of the zip file. |
612 | It is not concerned with displaying any details of the compressed data stored in the zip file. | |
b53e16ae | 613 | |
3432e5a1 | 614 | =back |
60092ce4 | 615 | |
0aaeb177 SH |
616 | =head1 Configuration and Compilation |
617 | ||
618 | XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools | |
619 | go here. Any other changes to the Perl build process should be listed here. | |
620 | However, any platform-specific changes should be listed in the | |
621 | L</Platform Support> section, instead. | |
622 | ||
623 | [ List changes as a =item entry ]. | |
309aab3a | 624 | |
e3c71926 | 625 | =over 4 |
b53e16ae FC |
626 | |
627 | =item * | |
628 | ||
60f0ee9d NC |
629 | F<pod/roffitall> is now build by F<pod/buildtoc>, instead of being shipped |
630 | with the distribution. Its list of manpages is now generated (and therefore | |
631 | current). See also RT #103202 for an unresolved related issue. | |
a3f52e2e | 632 | |
61f966e7 FC |
633 | =item * |
634 | ||
635 | Perl 5.15.5 had a bug in its installation script, which did not install | |
636 | F<unicore/Name.pm>. This has been corrected [perl #104226]. | |
637 | ||
638 | XXX Is that Perl version correct? Is the file path correct? | |
639 | ||
f4912a50 DR |
640 | =item * |
641 | ||
642 | The -Dusesitecustomize and -Duserelocatableinc options now work together | |
643 | properly. | |
644 | ||
0aaeb177 | 645 | =back |
a3f52e2e | 646 | |
0aaeb177 | 647 | =head1 Testing |
a3f52e2e | 648 | |
0aaeb177 SH |
649 | XXX Any significant changes to the testing of a freshly built perl should be |
650 | listed here. Changes which create B<new> files in F<t/> go here as do any | |
651 | large changes to the testing harness (e.g. when parallel testing was added). | |
652 | Changes to existing files in F<t/> aren't worth summarising, although the bugs | |
653 | that they represent may be covered elsewhere. | |
a3f52e2e | 654 | |
0aaeb177 | 655 | [ List each test improvement as a =item entry ] |
a3f52e2e | 656 | |
0aaeb177 | 657 | =over 4 |
a3f52e2e FC |
658 | |
659 | =item * | |
660 | ||
d1fb015b FC |
661 | The F<substr.t> and F<substr_thr.t> scripts for testing C<substr> have been |
662 | moved under F<t/op/>, where they were originally. They had been moved | |
663 | under F<t/re/> along with the substitution tests when that directory was | |
664 | created. | |
a3f52e2e | 665 | |
0aaeb177 | 666 | =back |
a3f52e2e | 667 | |
0aaeb177 | 668 | =head1 Platform Support |
a3f52e2e | 669 | |
0aaeb177 | 670 | XXX Any changes to platform support should be listed in the sections below. |
a3f52e2e | 671 | |
0aaeb177 SH |
672 | [ Within the sections, list each platform as a =item entry with specific |
673 | changes as paragraphs below it. ] | |
a3f52e2e | 674 | |
0aaeb177 | 675 | =head2 New Platforms |
a3f52e2e | 676 | |
0aaeb177 SH |
677 | XXX List any platforms that this version of perl compiles on, that previous |
678 | versions did not. These will either be enabled by new files in the F<hints/> | |
679 | directories, or new subdirectories and F<README> files at the top level of the | |
680 | source tree. | |
a3f52e2e | 681 | |
0aaeb177 | 682 | =over 4 |
a3f52e2e | 683 | |
0aaeb177 | 684 | =item XXX-some-platform |
a3f52e2e | 685 | |
0aaeb177 | 686 | XXX |
a3f52e2e | 687 | |
0aaeb177 | 688 | =back |
a3f52e2e | 689 | |
0aaeb177 | 690 | =head2 Discontinued Platforms |
ca955add | 691 | |
0aaeb177 | 692 | XXX List any platforms that this version of perl no longer compiles on. |
bbdd8bad | 693 | |
0aaeb177 | 694 | =over 4 |
bbdd8bad | 695 | |
0aaeb177 | 696 | =item XXX-some-platform |
ad32999b | 697 | |
0aaeb177 | 698 | XXX |
ad32999b | 699 | |
0aaeb177 | 700 | =back |
ad32999b | 701 | |
0aaeb177 | 702 | =head2 Platform-Specific Notes |
ad32999b | 703 | |
0aaeb177 SH |
704 | XXX List any changes for specific platforms. This could include configuration |
705 | and compilation changes or changes in portability/compatibility. However, | |
706 | changes within modules for platforms should generally be listed in the | |
707 | L</Modules and Pragmata> section. | |
ad32999b | 708 | |
f4912a50 DR |
709 | =head3 VMS |
710 | ||
0aaeb177 | 711 | =over 4 |
ad32999b | 712 | |
f4912a50 | 713 | =item * |
ad32999b | 714 | |
a3ef9f5c CB |
715 | A link-time error on VMS versions without C<symlink> support was |
716 | introduced in 5.15.1, but has now been corrected. | |
f4912a50 DR |
717 | |
718 | =item * | |
719 | ||
a3ef9f5c CB |
720 | Explicit support for VMS versions prior to v7.0 and DEC C versions prior |
721 | to v6.0 has been removed. | |
722 | ||
723 | =item * | |
724 | ||
725 | Since Perl 5.10.1, the home-grown C<stat> wrapper has been unable to | |
726 | distinguish between a directory name containing an underscore and an | |
727 | otherwise-identical filename containing a dot in the same position | |
728 | (e.g., t/test_pl as a directory and t/test.pl as a file). This problem | |
729 | has been corrected. | |
c15f899f | 730 | |
7f28d7ed | 731 | =back |
ad32999b | 732 | |
0aaeb177 | 733 | =head1 Internal Changes |
ad32999b | 734 | |
0aaeb177 SH |
735 | XXX Changes which affect the interface available to C<XS> code go here. |
736 | Other significant internal changes for future core maintainers should | |
737 | be noted as well. | |
ad32999b | 738 | |
0aaeb177 | 739 | [ List each change as a =item entry ] |
ad32999b | 740 | |
0aaeb177 | 741 | =over 4 |
ad32999b | 742 | |
3973654e FC |
743 | =item * |
744 | ||
0aaeb177 | 745 | XXX |
3973654e | 746 | |
0aaeb177 | 747 | =back |
cca38fda | 748 | |
0aaeb177 | 749 | =head1 Selected Bug Fixes |
9c7c1651 | 750 | |
0aaeb177 SH |
751 | XXX Important bug fixes in the core language are summarised here. |
752 | Bug fixes in files in F<ext/> and F<lib/> are best summarised in | |
753 | L</Modules and Pragmata>. | |
9c7c1651 | 754 | |
0aaeb177 | 755 | [ List each fix as a =item entry ] |
fce59cd4 | 756 | |
0aaeb177 | 757 | =over 4 |
fce59cd4 | 758 | |
b9e83cd1 FC |
759 | =item * |
760 | ||
7402016d AB |
761 | RT #78266: The regex engine has been leaking memory when accessing |
762 | named captures that weren't matched as part of a regex ever since 5.10 | |
763 | when they were introduced, e.g. this would consume over a hundred MB | |
764 | of memory: | |
765 | ||
e46b6a32 FC |
766 | for (1..10_000_000) { |
767 | if ("foo" =~ /(foo|(?<capture>bar))?/) { | |
768 | my $capture = $+{capture} | |
769 | } | |
770 | } | |
771 | system "ps -o rss $$"' | |
7402016d AB |
772 | |
773 | =item * | |
774 | ||
541cb22c FC |
775 | A constant subroutine assigned to a glob whose name contains a null will no |
776 | longer cause extra globs to pop into existence when the constant is | |
777 | referenced under its new name. | |
b9e83cd1 | 778 | |
679b54e7 FC |
779 | =item * |
780 | ||
781 | C<sort> was not treating C<sub {}> and C<sub {()}> as equivalent when such | |
782 | a sub was provided as the comparison routine. It used to croak on | |
783 | C<sub {()}>. | |
784 | ||
785 | =item * | |
786 | ||
787 | Subroutines from the C<autouse> namespace are once more exempt from | |
788 | redefinition warnings. This used to work in 5.005, but was broken in 5.6 | |
789 | for most subroutines. For subs created via XS that redefine subroutines | |
790 | from the C<autouse> package, this stopped working in 5.10. | |
791 | ||
792 | =item * | |
793 | ||
794 | New XSUBs now produce redefinition warnings if they overwrite existing | |
795 | subs, as they did in 5.8.x. (The C<autouse> logic was reversed in 5.10-14. | |
796 | Only subroutines from the C<autouse> namespace would warn when clobbered.) | |
797 | ||
798 | =item * | |
799 | ||
800 | Redefinition warnings triggered by the creation of XSUBs now respect | |
801 | Unicode glob names, instead of using the internal representation. This was | |
802 | missed in 5.15.4, partly because this warning was so hard to trigger. (See | |
803 | the previous item.) | |
804 | ||
805 | =item * | |
806 | ||
807 | C<newCONSTSUB> used to use compile-time warning hints, instead of run-time | |
808 | hints. The following code should never produce a redefinition warning, but | |
809 | it used to, if C<newCONSTSUB> redefine and existing subroutine: | |
810 | ||
811 | use warnings; | |
812 | BEGIN { | |
813 | no warnings; | |
814 | some_XS_function_that_calls_new_CONSTSUB(); | |
815 | } | |
816 | ||
61f966e7 FC |
817 | =item * |
818 | ||
819 | Redefinition warnings for constant subroutines are on by default (what are | |
820 | known as severe warnings in L<perldiag>). This was only the case when it | |
821 | was a glob assignment or declaration of a Perl subroutine that caused the | |
822 | warning. If the creation of XSUBs triggered the warning, it was not a | |
823 | default warning. This has been corrected. | |
824 | ||
825 | =item * | |
826 | ||
827 | The internal check to see whether a redefinition warning should occur used | |
828 | to emit "uninitialized" warnings in cases like this: | |
829 | ||
830 | use warnings "uninitialized"; | |
831 | use constant {u=>undef,v=>undef}; | |
832 | sub foo(){u} sub foo(){v} | |
833 | ||
834 | =item * | |
835 | ||
836 | A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized" | |
837 | warnings to report the wrong variable if the operator in question has | |
838 | two operands and one is C<%{...}> or C<@{...}>. This has been fixed | |
839 | [perl #103766]. | |
840 | ||
841 | =item * | |
842 | ||
843 | C<< version->new("version") >> and C<printf "%vd", "version"> no longer | |
844 | crash [perl #102586]. | |
845 | ||
d1fb015b FC |
846 | =item * |
847 | ||
848 | C<$tied =~ y/a/b/>, C<chop $tied> and C<chomp $tied> now call FETCH just | |
849 | once when $tied holds a reference. | |
850 | ||
851 | =item * | |
852 | ||
853 | Four-argument C<select> now always calls FETCH on tied arguments. It used | |
854 | to skip the call if the tied argument happened to hold C<undef> or a | |
855 | typeglob. | |
856 | ||
857 | =item * | |
858 | ||
859 | Four-argument C<select> no longer produces its "Non-string passed as | |
860 | bitmask" warning on tied or tainted variables that are strings. | |
861 | ||
862 | =item * | |
863 | ||
864 | C<sysread> now always calls FETCH on the buffer passed to it if it is tied. | |
865 | It used to skip the call if the tied variable happened to hold a typeglob. | |
866 | ||
867 | =item * | |
868 | ||
869 | C<< $tied .= <> >> now calls FETCH once on C<$tied>. It used to call it | |
870 | multiple times if the last value assigned to or returned from the tied | |
871 | variable was anything other than a string or typeglob. | |
872 | ||
66008486 FC |
873 | =item * |
874 | ||
875 | The C<evalbytes> keyword added in 5.15.5 was respecting C<use utf8> | |
876 | declarations from the outer scope, when it should have been ignoring them. | |
877 | ||
7e7629fa FC |
878 | =item * |
879 | ||
880 | C<goto &func> no longers crashes, but produces an error message, when the | |
881 | unwinding of the current subroutine's scope fires a destructor that | |
882 | undefines the subroutine being "goneto" [perl #99850]. | |
883 | ||
73512201 DG |
884 | =item * |
885 | ||
886 | Arithmetic assignment (C<$left += $right>) involving overloaded objects that | |
887 | rely on the 'nomethod' override no longer segfault when the left operand is not | |
888 | overloaded. | |
889 | ||
a1f0e6ed FC |
890 | =item * |
891 | ||
892 | Assigning C<__PACKAGE__> or any other shared hash key scalar to a stash | |
893 | element no longer causes a double free. Regardless of this change, the | |
894 | results of such assignments are still undefined. | |
895 | ||
896 | =item * | |
897 | ||
898 | Creating a C<UNIVERSAL::AUTOLOAD> sub no longer stops C<%+>, C<%-> and | |
899 | C<%!> from working some of the time [perl #105024]. | |
900 | ||
ad790500 FC |
901 | =item * |
902 | ||
903 | Assigning C<__PACKAGE__> or another shared hash key string to a variable no | |
904 | longer stops that variable from being tied if it happens to be a PVMG or | |
905 | PVLV internally. | |
906 | ||
6d91e957 KW |
907 | =item * |
908 | ||
909 | When presented with malformed UTF-8 input, the XS-callable functions | |
910 | C<is_utf8_string()>, C<is_utf8_string_loc()>, and | |
911 | C<is_utf8_string_loclen()> could read beyond the end of the input | |
912 | string by up to 12 bytes. This no longer happens. [perl #32080]. | |
913 | However, currently, C<is_utf8_char()> still has this defect, | |
914 | see L</is_utf8_char()> above. | |
915 | ||
d6b99bf4 FC |
916 | =item * |
917 | ||
918 | Doing a substitution on a tied variable returning a copy-on-write scalar | |
919 | used to cause an assertion failure or an "Attempt to free nonexistent | |
920 | shared string" warning. | |
921 | ||
922 | =item * | |
923 | ||
924 | A change in perl 5.15.4 caused C<caller()> to produce malloc errors and a | |
925 | crash with Perl's own malloc, and possibly with other malloc | |
926 | implementations, too [perl #104034]. | |
927 | ||
928 | =item * | |
929 | ||
930 | A bug fix in 5.15.5 could sometimes result in assertion failures under | |
931 | debugging builds of perl for certain syntax errors in C<eval>, such as | |
932 | C<eval(q|""!=!~//|);> | |
933 | ||
8aade7da DR |
934 | =item * |
935 | ||
936 | The "c [line num]" debugger command was broken by other debugger changes | |
937 | release in 5.15.3. This is now fixed. | |
938 | ||
c7b728ca SF |
939 | =item * |
940 | ||
941 | Breakpoints were not properly restored after a debugger restart using the | |
f27a23db | 942 | "R" command. This was broken in 5.15.3. This is now fixed. |
c7b728ca SF |
943 | |
944 | =item * | |
945 | ||
f27a23db DR |
946 | The debugger prompt did not display the current line in. This was broken in |
947 | 5.15.3. This is now fixed. | |
c7b728ca | 948 | |
0aaeb177 | 949 | =back |
bf19b80e | 950 | |
0aaeb177 | 951 | =head1 Known Problems |
bf19b80e | 952 | |
0aaeb177 SH |
953 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any |
954 | tests that had to be C<TODO>ed for the release would be noted here, unless | |
955 | they were specific to a particular platform (see below). | |
65b66aa9 | 956 | |
0aaeb177 SH |
957 | This is a list of some significant unfixed bugs, which are regressions |
958 | from either 5.XXX.XXX or 5.XXX.XXX. | |
65b66aa9 | 959 | |
0aaeb177 | 960 | [ List each fix as a =item entry ] |
b53e16ae | 961 | |
0aaeb177 | 962 | =over 4 |
b53e16ae | 963 | |
7c864bb3 VP |
964 | =item * |
965 | ||
0aaeb177 | 966 | XXX |
7c864bb3 | 967 | |
63ac71b9 | 968 | =back |
bbc28bfc | 969 | |
0aaeb177 | 970 | =head1 Obituary |
8fe05716 | 971 | |
0aaeb177 SH |
972 | XXX If any significant core contributor has died, we've added a short obituary |
973 | here. | |
8fe05716 | 974 | |
0aaeb177 | 975 | =head1 Acknowledgements |
8fe05716 | 976 | |
0aaeb177 | 977 | XXX Generate this with: |
8fe05716 | 978 | |
0aaeb177 | 979 | perl Porting/acknowledgements.pl v5.15.5..HEAD |
29cf780c | 980 | |
44691e6f AB |
981 | =head1 Reporting Bugs |
982 | ||
983 | If you find what you think is a bug, you might check the articles | |
34dc2ec0 | 984 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
44691e6f AB |
985 | bug database at http://rt.perl.org/perlbug/ . There may also be |
986 | information at http://www.perl.org/ , the Perl Home Page. | |
987 | ||
988 | If you believe you have an unreported bug, please run the L<perlbug> | |
989 | program included with your release. Be sure to trim your bug down | |
990 | to a tiny but sufficient test case. Your bug report, along with the | |
991 | output of C<perl -V>, will be sent off to perlbug@perl.org to be | |
992 | analysed by the Perl porting team. | |
993 | ||
994 | If the bug you are reporting has security implications, which make it | |
995 | inappropriate to send to a publicly archived mailing list, then please send | |
34dc2ec0 | 996 | it to perl5-security-report@perl.org. This points to a closed subscription |
b4707b2a FC |
997 | unarchived mailing list, which includes |
998 | all the core committers, who will be able | |
44691e6f AB |
999 | to help assess the impact of issues, figure out a resolution, and help |
1000 | co-ordinate the release of patches to mitigate or fix the problem across all | |
34dc2ec0 DM |
1001 | platforms on which Perl is supported. Please only use this address for |
1002 | security issues in the Perl core, not for modules independently | |
44691e6f AB |
1003 | distributed on CPAN. |
1004 | ||
1005 | =head1 SEE ALSO | |
1006 | ||
1007 | The F<Changes> file for an explanation of how to view exhaustive details | |
1008 | on what changed. | |
1009 | ||
1010 | The F<INSTALL> file for how to build Perl. | |
1011 | ||
1012 | The F<README> file for general stuff. | |
1013 | ||
1014 | The F<Artistic> and F<Copying> files for copyright information. | |
1015 | ||
1016 | =cut |