Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
eabfc7bc | 5 | perldelta - what is new for perl v5.22.0 |
c68523cb | 6 | |
238894db | 7 | =head1 DESCRIPTION |
c68523cb | 8 | |
f146a2b2 | 9 | This document describes differences between the 5.20.0 release and the 5.22.0 |
238894db | 10 | release. |
c68523cb | 11 | |
eabfc7bc RS |
12 | If you are upgrading from an earlier release such as 5.18.0, first read |
13 | L<perl5200delta>, which describes differences between 5.18.0 and 5.20.0. | |
14 | ||
15 | =head1 Core Enhancements | |
2ec11c70 | 16 | |
eabfc7bc | 17 | =head2 New bitwise operators |
b9c683b3 | 18 | |
eabfc7bc RS |
19 | A new experimental facility has been added that makes the four standard |
20 | bitwise operators (C<& | ^ ~>) treat their operands consistently as | |
21 | numbers, and introduces four new dotted operators (C<&. |. ^. ~.>) that | |
22 | treat their operands consistently as strings. The same applies to the | |
23 | assignment variants (C<&= |= ^= &.= |.= ^.=>). | |
2e4abf26 | 24 | |
eabfc7bc RS |
25 | To use this, enable the "bitwise" feature and disable the |
26 | "experimental::bitwise" warnings category. See L<perlop/Bitwise String | |
a75e6a3a SH |
27 | Operators> for details. |
28 | L<[perl #123466]|https://rt.perl.org/Ticket/Display.html?id=123466>. | |
eabfc7bc RS |
29 | |
30 | =head2 New double-diamond operator | |
31 | ||
32 | C<<< <<>> >>> is like C<< <> >> but uses three-argument C<open> to open | |
4ec8e6f0 KW |
33 | each file in C<@ARGV>. This means that each element of C<@ARGV> will be treated |
34 | as an actual file name, and C<"|foo"> won't be treated as a pipe open. | |
eabfc7bc RS |
35 | |
36 | =head2 New \b boundaries in regular expressions | |
37 | ||
38 | =head3 qr/\b{gcb}/ | |
39 | ||
40 | C<gcb> stands for Grapheme Cluster Boundary. It is a Unicode property | |
41 | that finds the boundary between sequences of characters that look like a | |
42 | single character to a native speaker of a language. Perl has long had | |
43 | the ability to deal with these through the C<\X> regular escape | |
44 | sequence. Now, there is an alternative way of handling these. See | |
45 | L<perlrebackslash/\b{}, \b, \B{}, \B> for details. | |
46 | ||
47 | =head3 qr/\b{wb}/ | |
48 | ||
49 | C<wb> stands for Word Boundary. It is a Unicode property | |
50 | that finds the boundary between words. This is similar to the plain | |
51 | C<\b> (without braces) but is more suitable for natural language | |
01842271 | 52 | processing. It knows, for example, that apostrophes can occur in the |
eabfc7bc RS |
53 | middle of words. See L<perlrebackslash/\b{}, \b, \B{}, \B> for details. |
54 | ||
55 | =head3 qr/\b{sb}/ | |
56 | ||
57 | C<sb> stands for Sentence Boundary. It is a Unicode property | |
58 | to aid in parsing natural language sentences. | |
59 | See L<perlrebackslash/\b{}, \b, \B{}, \B> for details. | |
60 | ||
61 | =head2 C<no re> covers more and is lexical | |
62 | ||
d140c31c | 63 | Previously running C<no re> would turn off only a few things. Now it |
eabfc7bc RS |
64 | turns off all the enabled things. For example, previously, you |
65 | couldn't turn off debugging, once enabled, inside the same block. | |
66 | ||
67 | =head2 Non-Capturing Regular Expression Flag | |
68 | ||
69 | Regular expressions now support a C</n> flag that disables capturing | |
d140c31c | 70 | and filling in C<$1>, C<$2>, etc inside of groups: |
eabfc7bc RS |
71 | |
72 | "hello" =~ /(hi|hello)/n; # $1 is not set | |
73 | ||
74 | This is equivalent to putting C<?:> at the beginning of every capturing group. | |
75 | ||
76 | See L<perlre/"n"> for more information. | |
77 | ||
78 | =head2 C<use re 'strict'> | |
79 | ||
80 | This applies stricter syntax rules to regular expression patterns | |
d140c31c | 81 | compiled within its scope. This will hopefully alert you to typos and |
eabfc7bc | 82 | other unintentional behavior that backwards-compatibility issues prevent |
d140c31c | 83 | us from reporting in normal regular expression compilations. Because the |
eabfc7bc | 84 | behavior of this is subject to change in future Perl releases as we gain |
d140c31c AC |
85 | experience, using this pragma will raise a warning of category |
86 | C<experimental::re_strict>. | |
eabfc7bc RS |
87 | See L<'strict' in re|re/'strict' mode>. |
88 | ||
ce93e38b | 89 | =head2 Unicode 7.0 (with correction) is now supported |
eabfc7bc RS |
90 | |
91 | For details on what is in this release, see | |
92 | L<http://www.unicode.org/versions/Unicode7.0.0/>. | |
ce93e38b KW |
93 | The version of Unicode 7.0 that comes with Perl includes |
94 | a correction dealing with glyph shaping in Arabic | |
95 | (see L<http://www.unicode.org/errata/#current_errata>). | |
96 | ||
eabfc7bc RS |
97 | |
98 | =head2 S<C<use locale>> can restrict which locale categories are affected | |
99 | ||
100 | It is now possible to pass a parameter to S<C<use locale>> to specify | |
101 | a subset of locale categories to be locale-aware, with the remaining | |
102 | ones unaffected. See L<perllocale/The "use locale" pragma> for details. | |
103 | ||
01842271 | 104 | =head2 Perl now supports POSIX 2008 locale currency additions |
eabfc7bc RS |
105 | |
106 | On platforms that are able to handle POSIX.1-2008, the | |
107 | hash returned by | |
108 | L<C<POSIX::localeconv()>|perllocale/The localeconv function> | |
109 | includes the international currency fields added by that version of the | |
110 | POSIX standard. These are | |
111 | C<int_n_cs_precedes>, | |
112 | C<int_n_sep_by_space>, | |
113 | C<int_n_sign_posn>, | |
114 | C<int_p_cs_precedes>, | |
115 | C<int_p_sep_by_space>, | |
116 | and | |
117 | C<int_p_sign_posn>. | |
118 | ||
50ea4745 | 119 | =head2 Better heuristics on older platforms for determining locale UTF-8ness |
eabfc7bc RS |
120 | |
121 | On platforms that implement neither the C99 standard nor the POSIX 2001 | |
50ea4745 | 122 | standard, determining if the current locale is UTF-8 or not depends on |
eabfc7bc RS |
123 | heuristics. These are improved in this release. |
124 | ||
125 | =head2 Aliasing via reference | |
126 | ||
127 | Variables and subroutines can now be aliased by assigning to a reference: | |
128 | ||
129 | \$c = \$d; | |
130 | \&x = \&y; | |
131 | ||
d140c31c AC |
132 | Aliasing can also be accomplished |
133 | by using a backslash before a C<foreach> iterator variable; this is | |
eabfc7bc RS |
134 | perhaps the most useful idiom this feature provides: |
135 | ||
136 | foreach \%hash (@array_of_hash_refs) { ... } | |
137 | ||
3209f716 KW |
138 | This feature is experimental and must be enabled via S<C<use feature |
139 | 'refaliasing'>>. It will warn unless the C<experimental::refaliasing> | |
eabfc7bc RS |
140 | warnings category is disabled. |
141 | ||
142 | See L<perlref/Assigning to References> | |
143 | ||
144 | =head2 C<prototype> with no arguments | |
145 | ||
a75e6a3a SH |
146 | C<prototype()> with no arguments now infers C<$_>. |
147 | L<[perl #123514]|https://rt.perl.org/Ticket/Display.html?id=123514>. | |
eabfc7bc | 148 | |
d140c31c | 149 | =head2 New C<:const> subroutine attribute |
eabfc7bc | 150 | |
d140c31c | 151 | The C<const> attribute can be applied to an anonymous subroutine. It |
f1c9eac6 DM |
152 | causes the new sub to be executed immediately whenever one is created |
153 | (i.e. when the C<sub> expression is evaluated). Its value is captured | |
154 | and used to create a new constant subroutine that is returned. This | |
155 | feature is experimental. See L<perlsub/Constant Functions>. | |
eabfc7bc RS |
156 | |
157 | =head2 C<fileno> now works on directory handles | |
158 | ||
159 | When the relevant support is available in the operating system, the | |
160 | C<fileno> builtin now works on directory handles, yielding the | |
161 | underlying file descriptor in the same way as for filehandles. On | |
162 | operating systems without such support, C<fileno> on a directory handle | |
163 | continues to return the undefined value, as before, but also sets C<$!> to | |
164 | indicate that the operation is not supported. | |
165 | ||
166 | Currently, this uses either a C<dd_fd> member in the OS C<DIR> | |
4ec8e6f0 | 167 | structure, or a C<dirfd(3)> function as specified by POSIX.1-2008. |
eabfc7bc RS |
168 | |
169 | =head2 List form of pipe open implemented for Win32 | |
170 | ||
171 | The list form of pipe: | |
172 | ||
173 | open my $fh, "-|", "program", @arguments; | |
174 | ||
175 | is now implemented on Win32. It has the same limitations as C<system | |
176 | LIST> on Win32, since the Win32 API doesn't accept program arguments | |
177 | as a list. | |
178 | ||
179 | =head2 C<close> now sets C<$!> | |
180 | ||
181 | When an I/O error occurs, the fact that there has been an error is recorded | |
182 | in the handle. C<close> returns false for such a handle. Previously, the | |
183 | value of C<$!> would be untouched by C<close>, so the common convention of | |
4ec8e6f0 | 184 | writing S<C<close $fh or die $!>> did not work reliably. Now the handle |
eabfc7bc RS |
185 | records the value of C<$!>, too, and C<close> restores it. |
186 | ||
187 | =head2 Assignment to list repetition | |
188 | ||
189 | C<(...) x ...> can now be used within a list that is assigned to, as long | |
4ec8e6f0 KW |
190 | as the left-hand side is a valid lvalue. This allows S<C<(undef,undef,$foo) |
191 | = that_function()>> to be written as S<C<((undef)x2, $foo) = that_function()>>. | |
eabfc7bc RS |
192 | |
193 | =head2 Infinity and NaN (not-a-number) handling improved | |
194 | ||
d140c31c AC |
195 | Floating point values are able to hold the special values infinity, negative |
196 | infinity, and NaN (not-a-number). Now we more robustly recognize and | |
3209f716 KW |
197 | propagate the value in computations, and on output normalize them to |
198 | an infinite value or not-a-number. | |
eabfc7bc RS |
199 | |
200 | See also the L<POSIX> enhancements. | |
201 | ||
202 | =head2 Floating point parsing has been improved | |
203 | ||
204 | Parsing and printing of floating point values has been improved. | |
205 | ||
206 | As a completely new feature, hexadecimal floating point literals | |
4ec8e6f0 | 207 | (like C<0x1.23p-4>) are now supported, and they can be output with |
3209f716 | 208 | S<C<printf "%a">>. See L<perldata/Scalar value constructors> for more |
d140c31c | 209 | details. |
eabfc7bc RS |
210 | |
211 | =head2 Packing infinity or not-a-number into a character is now fatal | |
212 | ||
213 | Before, when trying to pack infinity or not-a-number into a | |
214 | (signed) character, Perl would warn, and assumed you tried to | |
215 | pack C<< 0xFF >>; if you gave it as an argument to C<< chr >>, | |
216 | C<< U+FFFD >> was returned. | |
217 | ||
218 | But now, all such actions (C<< pack >>, C<< chr >>, and C<< print '%c' >>) | |
219 | result in a fatal error. | |
220 | ||
221 | =head2 Experimental C Backtrace API | |
2e4abf26 | 222 | |
43831b1f | 223 | Perl now supports (via a C level API) retrieving |
eabfc7bc | 224 | the C level backtrace (similar to what symbolic debuggers like gdb do). |
fea59588 | 225 | |
eabfc7bc RS |
226 | The backtrace returns the stack trace of the C call frames, |
227 | with the symbol names (function names), the object names (like "perl"), | |
228 | and if it can, also the source code locations (file:line). | |
229 | ||
230 | The supported platforms are Linux and OS X (some *BSD might work at | |
231 | least partly, but they have not yet been tested). | |
232 | ||
233 | The feature needs to be enabled with C<Configure -Dusecbacktrace>. | |
234 | ||
eabfc7bc | 235 | See L<perlhacktips/"C backtrace"> for more information. |
83a5d6b6 | 236 | |
7f9fef93 | 237 | =head1 Security |
e455391f | 238 | |
eabfc7bc RS |
239 | =head2 Perl is now compiled with -fstack-protector-strong if available |
240 | ||
241 | Perl has been compiled with the anti-stack-smashing option | |
242 | C<-fstack-protector> since 5.10.1. Now Perl uses the newer variant | |
243 | called C<-fstack-protector-strong>, if available. | |
244 | ||
245 | =head2 The L<Safe> module could allow outside packages to be replaced | |
246 | ||
247 | Critical bugfix: outside packages could be replaced. L<Safe> has | |
248 | been patched to 2.38 to address this. | |
249 | ||
250 | =head2 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available | |
e455391f | 251 | |
eabfc7bc RS |
252 | The 'code hardening' option called C<_FORTIFY_SOURCE>, available in |
253 | gcc 4.*, is now always used for compiling Perl, if available. | |
254 | ||
255 | Note that this isn't necessarily a huge step since in many platforms | |
256 | the step had already been taken several years ago: many Linux | |
257 | distributions (like Fedora) have been using this option for Perl, | |
258 | and OS X has enforced the same for many years. | |
53902397 | 259 | |
7f9fef93 | 260 | =head1 Incompatible Changes |
79a77127 | 261 | |
eabfc7bc RS |
262 | =head2 Subroutine signatures moved before attributes |
263 | ||
264 | The experimental sub signatures feature, as introduced in 5.20, parsed | |
d140c31c AC |
265 | signatures after attributes. In this release, following feedback from users |
266 | of the experimental feature, the positioning has been moved such that | |
267 | signatures occur after the subroutine name (if any) and before the attribute | |
268 | list (if any). | |
eabfc7bc RS |
269 | |
270 | =head2 C<&> and C<\&> prototypes accepts only subs | |
271 | ||
43831b1f DM |
272 | The C<&> prototype character now accepts only anonymous subs (C<sub |
273 | {...}>), things beginning with C<\&>, or an explicit C<undef>. Formerly | |
274 | it erroneously also allowed references to arrays, hashes, and lists. | |
a75e6a3a SH |
275 | L<[perl #4539]|https://rt.perl.org/Ticket/Display.html?id=4539>. |
276 | L<[perl #123062]|https://rt.perl.org/Ticket/Display.html?id=123062>. | |
43831b1f | 277 | L<[perl #123062]|https://rt.perl.org/Ticket/Display.html?id=123475>. |
eabfc7bc | 278 | |
43831b1f DM |
279 | In addition, the C<\&> prototype was allowing subroutine calls, whereas |
280 | now it only allows subroutines: C<&foo> is still permitted as an argument, | |
281 | while C<&foo()> and C<foo()> no longer are. | |
a75e6a3a | 282 | L<[perl #77860]|https://rt.perl.org/Ticket/Display.html?id=77860>. |
eabfc7bc RS |
283 | |
284 | =head2 C<use encoding> is now lexical | |
285 | ||
286 | The L<encoding> pragma's effect is now limited to lexical scope. This | |
287 | pragma is deprecated, but in the meantime, it could adversely affect | |
288 | unrelated modules that are included in the same program. | |
289 | ||
290 | =head2 List slices returning empty lists | |
291 | ||
d140c31c | 292 | List slices now return an empty list only if the original list was empty |
eabfc7bc | 293 | (or if there are no indices). Formerly, a list slice would return an empty |
43831b1f | 294 | list if all indices fell outside the original list; now it returns a list |
3209f716 | 295 | of C<undef> values in that case. |
a75e6a3a | 296 | L<[perl #114498]|https://rt.perl.org/Ticket/Display.html?id=114498>. |
eabfc7bc | 297 | |
01842271 | 298 | =head2 C<\N{}> with a sequence of multiple spaces is now a fatal error |
eabfc7bc | 299 | |
3209f716 | 300 | E.g. S<C<\N{TOOE<nbsp>E<nbsp>MANY SPACES}>> or S<C<\N{TRAILING SPACE }>>. |
eabfc7bc RS |
301 | This has been deprecated since v5.18. |
302 | ||
303 | =head2 S<C<use UNIVERSAL '...'>> is now a fatal error | |
304 | ||
305 | Importing functions from C<UNIVERSAL> has been deprecated since v5.12, and | |
d140c31c | 306 | is now a fatal error. S<C<use UNIVERSAL>> without any arguments is still |
eabfc7bc RS |
307 | allowed. |
308 | ||
309 | =head2 In double-quotish C<\cI<X>>, I<X> must now be a printable ASCII character | |
310 | ||
311 | In prior releases, failure to do this raised a deprecation warning. | |
312 | ||
d1197d77 | 313 | =head2 Splitting the tokens C<(?> and C<(*> in regular expressions is now a fatal compilation error. |
eabfc7bc RS |
314 | |
315 | These had been deprecated since v5.18. | |
316 | ||
43831b1f DM |
317 | =head2 C<qr/foo/x> now ignores all Unicode pattern white space |
318 | ||
319 | The C</x> regular expression modifier allows the pattern to contain | |
320 | white space and comments (both of which are ignored) for improved | |
321 | readability. Until now, not all the white space characters that Unicode | |
322 | designates for this purpose were handled. The additional ones now | |
323 | recognized are | |
324 | ||
325 | U+0085 NEXT LINE | |
326 | U+200E LEFT-TO-RIGHT MARK | |
327 | U+200F RIGHT-TO-LEFT MARK | |
328 | U+2028 LINE SEPARATOR | |
329 | U+2029 PARAGRAPH SEPARATOR | |
eabfc7bc RS |
330 | |
331 | The use of these characters with C</x> outside bracketed character | |
332 | classes and when not preceded by a backslash has raised a deprecation | |
43831b1f | 333 | warning since v5.18. Now they will be ignored. |
eabfc7bc | 334 | |
43831b1f | 335 | =head2 Comment lines within S<C<(?[ ])>> are now ended only by a C<\n> |
eabfc7bc RS |
336 | |
337 | S<C<(?[ ])>> is an experimental feature, introduced in v5.18. It operates | |
43831b1f | 338 | as if C</x> is always enabled. But there was a difference: comment |
eabfc7bc RS |
339 | lines (following a C<#> character) were terminated by anything matching |
340 | C<\R> which includes all vertical whitespace, such as form feeds. For | |
341 | consistency, this is now changed to match what terminates comment lines | |
342 | outside S<C<(?[ ])>>, namely a C<\n> (even if escaped), which is the | |
343 | same as what terminates a heredoc string and formats. | |
344 | ||
345 | =head2 C<(?[...])> operators now follow standard Perl precedence | |
346 | ||
347 | This experimental feature allows set operations in regular expression patterns. | |
348 | Prior to this, the intersection operator had the same precedence as the other | |
349 | binary operators. Now it has higher precedence. This could lead to different | |
350 | outcomes than existing code expects (though the documentation has always noted | |
351 | that this change might happen, recommending fully parenthesizing the | |
352 | expressions). See L<perlrecharclass/Extended Bracketed Character Classes>. | |
353 | ||
4ec8e6f0 | 354 | =head2 Omitting C<%> and C<@> on hash and array names is no longer permitted |
c14a43b7 | 355 | |
4ec8e6f0 | 356 | Really old Perl let you omit the C<@> on array names and the C<%> on hash |
eabfc7bc | 357 | names in some spots. This has issued a deprecation warning since Perl |
93780ae6 | 358 | 5.000, and is no longer permitted. |
c14a43b7 | 359 | |
d140c31c | 360 | =head2 C<"$!"> text is now in English outside the scope of C<use locale> |
eabfc7bc RS |
361 | |
362 | Previously, the text, unlike almost everything else, always came out | |
363 | based on the current underlying locale of the program. (Also affected | |
d140c31c AC |
364 | on some systems is C<"$^E">.) For programs that are unprepared to |
365 | handle locale differences, this can cause garbage text to be displayed. | |
366 | It's better to display text that is translatable via some tool than | |
367 | garbage text which is much harder to figure out. | |
eabfc7bc RS |
368 | |
369 | =head2 C<"$!"> text will be returned in UTF-8 when appropriate | |
370 | ||
371 | The stringification of C<$!> and C<$^E> will have the UTF-8 flag set | |
372 | when the text is actually non-ASCII UTF-8. This will enable programs | |
373 | that are set up to be locale-aware to properly output messages in the | |
374 | user's native language. Code that needs to continue the 5.20 and | |
375 | earlier behavior can do the stringification within the scopes of both | |
d140c31c | 376 | S<C<use bytes>> and S<C<use locale ":messages">>. No other Perl |
4ec8e6f0 | 377 | operations will |
eabfc7bc | 378 | be affected by locale; only C<$!> and C<$^E> stringification. The |
d140c31c | 379 | C<bytes> pragma causes the UTF-8 flag to not be set, just as in previous |
a75e6a3a SH |
380 | Perl releases. This resolves |
381 | L<[perl #112208]|https://rt.perl.org/Ticket/Display.html?id=112208>. | |
eabfc7bc RS |
382 | |
383 | =head2 Support for C<?PATTERN?> without explicit operator has been removed | |
384 | ||
d140c31c AC |
385 | The C<m?PATTERN?> construct, which allows matching a regex only once, |
386 | previously had an alternative form that was written directly with a question | |
387 | mark delimiter, omitting the explicit C<m> operator. This usage has produced | |
388 | a deprecation warning since 5.14.0. It is now a syntax error, so that the | |
389 | question mark can be available for use in new operators. | |
eabfc7bc RS |
390 | |
391 | =head2 C<defined(@array)> and C<defined(%hash)> are now fatal errors | |
392 | ||
393 | These have been deprecated since v5.6.1 and have raised deprecation | |
394 | warnings since v5.16. | |
395 | ||
01842271 | 396 | =head2 Using a hash or an array as a reference are now fatal errors |
eabfc7bc | 397 | |
43831b1f | 398 | For example, C<< %foo->{"bar"} >> now causes a fatal compilation |
eabfc7bc RS |
399 | error. These have been deprecated since before v5.8, and have raised |
400 | deprecation warnings since then. | |
401 | ||
402 | =head2 Changes to the C<*> prototype | |
403 | ||
404 | The C<*> character in a subroutine's prototype used to allow barewords to take | |
43831b1f DM |
405 | precedence over most, but not all, subroutine names. It was never |
406 | consistent and exhibited buggy behaviour. | |
eabfc7bc RS |
407 | |
408 | Now it has been changed, so subroutines always take precedence over barewords, | |
409 | which brings it into conformity with similarly prototyped built-in functions: | |
410 | ||
411 | sub splat(*) { ... } | |
412 | sub foo { ... } | |
413 | splat(foo); # now always splat(foo()) | |
414 | splat(bar); # still splat('bar') as before | |
415 | close(foo); # close(foo()) | |
416 | close(bar); # close('bar') | |
c14a43b7 | 417 | |
7f9fef93 | 418 | =head1 Deprecations |
47cb8ddb | 419 | |
eabfc7bc | 420 | =head2 Setting C<${^ENCODING}> to anything but C<undef> |
c14a43b7 | 421 | |
d140c31c AC |
422 | This variable allows Perl scripts to be written in an encoding other than |
423 | ASCII or UTF-8. However, it affects all modules globally, leading | |
eabfc7bc RS |
424 | to wrong answers and segmentation faults. New scripts should be written |
425 | in UTF-8; old scripts should be converted to UTF-8, which is easily done | |
726f20d2 | 426 | with the L<piconv> utility. |
c14a43b7 | 427 | |
eabfc7bc | 428 | =head2 Use of non-graphic characters in single-character variable names |
51c2f40f | 429 | |
eabfc7bc RS |
430 | The syntax for single-character variable names is more lenient than |
431 | for longer variable names, allowing the one-character name to be a | |
432 | punctuation character or even invisible (a non-graphic). Perl v5.20 | |
433 | deprecated the ASCII-range controls as such a name. Now, all | |
434 | non-graphic characters that formerly were allowed are deprecated. | |
d140c31c AC |
435 | The practical effect of this occurs only when not under C<S<use |
436 | utf8>>, and affects just the C1 controls (code points 0x80 through | |
eabfc7bc | 437 | 0xFF), NO-BREAK SPACE, and SOFT HYPHEN. |
83a5d6b6 | 438 | |
eabfc7bc | 439 | =head2 Inlining of C<sub () { $var }> with observable side-effects |
abec5bed | 440 | |
4ec8e6f0 KW |
441 | In many cases Perl makes S<C<sub () { $var }>> into an inlinable constant |
442 | subroutine, capturing the value of C<$var> at the time the C<sub> expression | |
eabfc7bc | 443 | is evaluated. This can break the closure behaviour in those cases where |
43831b1f DM |
444 | C<$var> is subsequently modified, since the subroutine won't return the |
445 | changed value. (Note that this all only applies to anonymous subroutines | |
3209f716 | 446 | with an empty prototype (S<C<sub ()>>).) |
abec5bed | 447 | |
eabfc7bc RS |
448 | This usage is now deprecated in those cases where the variable could be |
449 | modified elsewhere. Perl detects those cases and emits a deprecation | |
450 | warning. Such code will likely change in the future and stop producing a | |
451 | constant. | |
abec5bed | 452 | |
eabfc7bc RS |
453 | If your variable is only modified in the place where it is declared, then |
454 | Perl will continue to make the sub inlinable with no warnings. | |
c14a43b7 | 455 | |
eabfc7bc RS |
456 | sub make_constant { |
457 | my $var = shift; | |
458 | return sub () { $var }; # fine | |
459 | } | |
c14a43b7 | 460 | |
eabfc7bc RS |
461 | sub make_constant_deprecated { |
462 | my $var; | |
463 | $var = shift; | |
464 | return sub () { $var }; # deprecated | |
465 | } | |
c14a43b7 | 466 | |
eabfc7bc RS |
467 | sub make_constant_deprecated2 { |
468 | my $var = shift; | |
469 | log_that_value($var); # could modify $var | |
470 | return sub () { $var }; # deprecated | |
471 | } | |
c14a43b7 | 472 | |
4ec8e6f0 | 473 | In the second example above, detecting that C<$var> is assigned to only once |
eabfc7bc RS |
474 | is too hard to detect. That it happens in a spot other than the C<my> |
475 | declaration is enough for Perl to find it suspicious. | |
7f9fef93 | 476 | |
eabfc7bc RS |
477 | This deprecation warning happens only for a simple variable for the body of |
478 | the sub. (A C<BEGIN> block or C<use> statement inside the sub is ignored, | |
479 | because it does not become part of the sub's body.) For more complex | |
4ec8e6f0 | 480 | cases, such as S<C<sub () { do_something() if 0; $var }>> the behaviour has |
eabfc7bc RS |
481 | changed such that inlining does not happen if the variable is modifiable |
482 | elsewhere. Such cases should be rare. | |
c14a43b7 | 483 | |
eabfc7bc | 484 | =head2 Use of multiple /x regexp modifiers |
c14a43b7 | 485 | |
eabfc7bc | 486 | It is now deprecated to say something like any of the following: |
c14a43b7 | 487 | |
eabfc7bc RS |
488 | qr/foo/xx; |
489 | /(?xax:foo)/; | |
490 | use re qw(/amxx); | |
be39acb2 | 491 | |
eabfc7bc RS |
492 | That is, now C<x> should only occur once in any string of contiguous |
493 | regular expression pattern modifiers. We do not believe there are any | |
494 | occurrences of this in all of CPAN. This is in preparation for a future | |
d140c31c | 495 | Perl release having C</xx> permit white-space for readability in |
eabfc7bc RS |
496 | bracketed character classes (those enclosed in square brackets: |
497 | C<[...]>). | |
c14a43b7 | 498 | |
d1197d77 | 499 | =head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now deprecated |
60dcce55 | 500 | |
eabfc7bc RS |
501 | This non-graphic character is essentially indistinguishable from a |
502 | regular space, and so should not be allowed. See | |
503 | L<charnames/CUSTOM ALIASES>. | |
60dcce55 | 504 | |
eabfc7bc RS |
505 | =head2 A literal C<"{"> should now be escaped in a pattern |
506 | ||
507 | If you want a literal left curly bracket (also called a left brace) in a | |
508 | regular expression pattern, you should now escape it by either | |
509 | preceding it with a backslash (C<"\{">) or enclosing it within square | |
510 | brackets C<"[{]">, or by using C<\Q>; otherwise a deprecation warning | |
511 | will be raised. This was first announced as forthcoming in the v5.16 | |
512 | release; it will allow future extensions to the language to happen. | |
513 | ||
514 | =head2 Making all warnings fatal is discouraged | |
515 | ||
516 | The documentation for L<fatal warnings|warnings/Fatal Warnings> notes that | |
d140c31c | 517 | C<< use warnings FATAL => 'all' >> is discouraged, and provides stronger |
eabfc7bc RS |
518 | language about the risks of fatal warnings in general. |
519 | ||
520 | =head1 Performance Enhancements | |
79a77127 | 521 | |
7f9fef93 | 522 | =over 4 |
abec5bed DIM |
523 | |
524 | =item * | |
525 | ||
43831b1f | 526 | If a method or class name is known at compile time, a hash is precomputed |
eabfc7bc RS |
527 | to speed up run-time method lookup. Also, compound method names like |
528 | C<SUPER::new> are parsed at compile time, to save having to parse them at | |
529 | run time. | |
9749148e | 530 | |
eabfc7bc | 531 | =item * |
9749148e | 532 | |
eabfc7bc RS |
533 | Array and hash lookups (especially nested ones) that use only constants |
534 | or simple variables as keys, are now considerably faster. See | |
535 | L</Internal Changes> for more details. | |
abec5bed DIM |
536 | |
537 | =item * | |
538 | ||
eabfc7bc RS |
539 | C<(...)x1>, C<("constant")x0> and C<($scalar)x0> are now optimised in list |
540 | context. If the right-hand argument is a constant 1, the repetition | |
541 | operator disappears. If the right-hand argument is a constant 0, the whole | |
6a3ea89b | 542 | expression is optimised to the empty list, so long as the left-hand |
d140c31c AC |
543 | argument is a simple scalar or constant. (That is, C<(foo())x0> is not |
544 | subject to this optimisation.) | |
6bb5549b | 545 | |
eabfc7bc | 546 | =item * |
7f9fef93 | 547 | |
eabfc7bc RS |
548 | C<substr> assignment is now optimised into 4-argument C<substr> at the end |
549 | of a subroutine (or as the argument to C<return>). Previously, this | |
550 | optimisation only happened in void context. | |
abec5bed | 551 | |
eabfc7bc | 552 | =item * |
7f9fef93 | 553 | |
43831b1f DM |
554 | In C<"\L...">, C<"\Q...">, etc., the extra "stringify" op is now optimised |
555 | away, making these just as fast as C<lcfirst>, C<quotemeta>, etc. | |
2e4abf26 | 556 | |
eabfc7bc | 557 | =item * |
83a5d6b6 | 558 | |
eabfc7bc RS |
559 | Assignment to an empty list is now sometimes faster. In particular, it |
560 | never calls C<FETCH> on tied arguments on the right-hand side, whereas it | |
561 | used to sometimes. | |
562 | ||
563 | =item * | |
83a5d6b6 | 564 | |
d140c31c AC |
565 | There is a performance improvement of up to 20% when C<length> is applied to |
566 | a non-magical, non-tied string, and either C<use bytes> is in scope or the | |
567 | string doesn't use UTF-8 internally. | |
338906ce | 568 | |
eabfc7bc | 569 | =item * |
5de148ee | 570 | |
d140c31c AC |
571 | On most perl builds with 64-bit integers, memory usage for non-magical, |
572 | non-tied scalars containing only a floating point value has been reduced | |
573 | by between 8 and 32 bytes, depending on OS. | |
5de148ee | 574 | |
eabfc7bc | 575 | =item * |
5de148ee | 576 | |
d140c31c AC |
577 | In C<@array = split>, the assignment can be optimized away, so that C<split> |
578 | writes directly to the array. This optimisation was happening only for | |
43831b1f DM |
579 | package arrays other than C<@_>, and only sometimes. Now this |
580 | optimisation happens almost all the time. | |
5de148ee | 581 | |
eabfc7bc | 582 | =item * |
7f9fef93 | 583 | |
43831b1f | 584 | C<join> is now subject to constant folding. So for example |
3209f716 | 585 | S<C<join "-", "a", "b">> is converted at compile-time to C<"a-b">. |
43831b1f | 586 | Moreover, C<join> with a scalar or constant for the separator and a |
d140c31c | 587 | single-item list to join is simplified to a stringification, and the |
43831b1f | 588 | separator doesn't even get evaluated. |
5de148ee | 589 | |
eabfc7bc | 590 | =item * |
47cb8ddb | 591 | |
eabfc7bc | 592 | C<qq(@array)> is implemented using two ops: a stringify op and a join op. |
4ec8e6f0 | 593 | If the C<qq> contains nothing but a single array, the stringification is |
eabfc7bc | 594 | optimized away. |
47cb8ddb SH |
595 | |
596 | =item * | |
597 | ||
4ec8e6f0 KW |
598 | S<C<our $var>> and S<C<our($s,@a,%h)>> in void context are no longer evaluated at |
599 | run time. Even a whole sequence of S<C<our $foo;>> statements will simply be | |
eabfc7bc | 600 | skipped over. The same applies to C<state> variables. |
47cb8ddb | 601 | |
eabfc7bc | 602 | =item * |
47cb8ddb | 603 | |
eabfc7bc RS |
604 | Many internal functions have been refactored to improve performance and reduce |
605 | their memory footprints. | |
eabfc7bc RS |
606 | L<[perl #121436]|https://rt.perl.org/Ticket/Display.html?id=121436> |
607 | L<[perl #121906]|https://rt.perl.org/Ticket/Display.html?id=121906> | |
608 | L<[perl #121969]|https://rt.perl.org/Ticket/Display.html?id=121969> | |
47cb8ddb | 609 | |
eabfc7bc | 610 | =item * |
47cb8ddb | 611 | |
eabfc7bc | 612 | C<-T> and C<-B> filetests will return sooner when an empty file is detected. |
a75e6a3a | 613 | L<[perl #121489]|https://rt.perl.org/Ticket/Display.html?id=121489> |
47cb8ddb | 614 | |
eabfc7bc | 615 | =item * |
5de148ee | 616 | |
01842271 | 617 | Hash lookups where the key is a constant are faster. |
be39acb2 SH |
618 | |
619 | =item * | |
620 | ||
d140c31c | 621 | Subroutines with an empty prototype and a body containing just C<undef> are now |
eabfc7bc RS |
622 | eligible for inlining. |
623 | L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728> | |
be39acb2 | 624 | |
eabfc7bc | 625 | =item * |
be39acb2 | 626 | |
43831b1f DM |
627 | Subroutines in packages no longer need to be stored in typeglobs: |
628 | declaring a subroutine will now put a simple sub reference directly in the | |
629 | stash if possible, saving memory. The typeglob still notionally exists, | |
630 | so accessing it will cause the stash entry to be upgraded to a typeglob | |
631 | (i.e. this is just an internal implementation detail). | |
632 | This optimization does not currently apply to XSUBs or exported | |
633 | subroutines, and method calls will undo it, since they cache things in | |
634 | typeglobs. | |
eabfc7bc | 635 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> |
7f9fef93 | 636 | |
eabfc7bc | 637 | =item * |
be39acb2 | 638 | |
eabfc7bc RS |
639 | The functions C<utf8::native_to_unicode()> and C<utf8::unicode_to_native()> |
640 | (see L<utf8>) are now optimized out on ASCII platforms. There is now not even | |
641 | a minimal performance hit in writing code portable between ASCII and EBCDIC | |
642 | platforms. | |
be39acb2 SH |
643 | |
644 | =item * | |
645 | ||
eabfc7bc | 646 | Win32 Perl uses 8 KB less of per-process memory than before for every perl |
43831b1f | 647 | process, because some data is now memory mapped from disk and shared |
d140c31c | 648 | between processes from the same perl binary. |
be39acb2 SH |
649 | |
650 | =back | |
651 | ||
eabfc7bc | 652 | =head1 Modules and Pragmata |
83a5d6b6 | 653 | |
f5b63a6e RS |
654 | Many of the libraries distributed with perl have been upgraded since v5.20.0. |
655 | For a complete list of changes, run: | |
83a5d6b6 | 656 | |
f5b63a6e | 657 | corelist --diff 5.20.0 5.22.0 |
338906ce | 658 | |
f5b63a6e | 659 | You can substitute your favorite version in place of 5.20.0, too. |
cd7bac54 | 660 | |
f5b63a6e | 661 | =head2 Removed Modules and Pragmata |
391823f2 | 662 | |
f5b63a6e RS |
663 | The following modules (and associated modules) have been removed from the core |
664 | perl distribution: | |
eabfc7bc RS |
665 | |
666 | =over 4 | |
667 | ||
668 | =item * | |
669 | ||
f5b63a6e | 670 | L<CGI> |
69e954a5 | 671 | |
7f9fef93 | 672 | =item * |
86e0176a | 673 | |
f5b63a6e | 674 | L<Module::Build> |
69e954a5 | 675 | |
e5998677 | 676 | =back |
20b5e916 | 677 | |
eabfc7bc RS |
678 | =head1 Documentation |
679 | ||
680 | =head2 New Documentation | |
532ecd00 | 681 | |
eabfc7bc | 682 | =head3 L<perlunicook> |
d76c14eb | 683 | |
eabfc7bc RS |
684 | This document, by Tom Christiansen, provides examples of handling Unicode in |
685 | Perl. | |
686 | ||
687 | =head2 Changes to Existing Documentation | |
688 | ||
7595828f KW |
689 | =head3 L<perlaix> |
690 | ||
691 | =over 4 | |
692 | ||
693 | =item * | |
694 | ||
695 | A note on long doubles has been added. | |
696 | ||
697 | =back | |
698 | ||
699 | ||
eabfc7bc | 700 | =head3 L<perlapi> |
d547bad0 | 701 | |
e5998677 | 702 | =over 4 |
d547bad0 | 703 | |
8a95d307 FC |
704 | =item * |
705 | ||
eabfc7bc | 706 | Note that C<SvSetSV> doesn't do set magic. |
532ecd00 | 707 | |
eabfc7bc | 708 | =item * |
532ecd00 | 709 | |
6ba7438b | 710 | C<sv_usepvn_flags> - fix documentation to mention the use of C<Newx> instead of |
eabfc7bc | 711 | C<malloc>. |
532ecd00 | 712 | |
eabfc7bc | 713 | L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869> |
532ecd00 | 714 | |
eabfc7bc | 715 | =item * |
532ecd00 | 716 | |
eabfc7bc | 717 | Clarify where C<NUL> may be embedded or is required to terminate a string. |
532ecd00 | 718 | |
eabfc7bc | 719 | =item * |
532ecd00 | 720 | |
d140c31c AC |
721 | Some documentation that was previously missing due to formatting errors is |
722 | now included. | |
532ecd00 | 723 | |
eabfc7bc | 724 | =item * |
532ecd00 | 725 | |
eabfc7bc | 726 | Entries are now organized into groups rather than by file where they are found. |
532ecd00 | 727 | |
eabfc7bc | 728 | =item * |
532ecd00 | 729 | |
eabfc7bc RS |
730 | Alphabetical sorting of entries is now handled by the POD generator to make |
731 | entries easier to find when scanning. | |
732 | ||
733 | =back | |
338906ce | 734 | |
eabfc7bc | 735 | =head3 L<perldata> |
338906ce | 736 | |
e5998677 | 737 | =over 4 |
338906ce | 738 | |
eabfc7bc | 739 | =item * |
2f304be9 | 740 | |
eabfc7bc RS |
741 | The syntax of single-character variable names has been brought |
742 | up-to-date and more fully explained. | |
9749148e | 743 | |
7595828f KW |
744 | =item * |
745 | ||
746 | Hexadecimal floating point numbers are described, as are infinity and | |
747 | NaN. | |
748 | ||
7f9fef93 | 749 | =back |
9749148e | 750 | |
eabfc7bc | 751 | =head3 L<perlebcdic> |
47cb8ddb | 752 | |
7f9fef93 | 753 | =over 4 |
47cb8ddb | 754 | |
eabfc7bc | 755 | =item * |
47cb8ddb | 756 | |
eabfc7bc RS |
757 | This document has been significantly updated in the light of recent |
758 | improvements to EBCDIC support. | |
47cb8ddb | 759 | |
7f9fef93 | 760 | =back |
47cb8ddb | 761 | |
7595828f KW |
762 | =head3 L<perlfilter> |
763 | ||
764 | =over 4 | |
765 | ||
766 | =item * | |
767 | ||
768 | Added a L<LIMITATIONS|perlfilter/LIMITATIONS> section. | |
769 | ||
770 | =back | |
771 | ||
772 | ||
eabfc7bc | 773 | =head3 L<perlfunc> |
be39acb2 | 774 | |
eabfc7bc | 775 | =over 4 |
be39acb2 | 776 | |
eabfc7bc | 777 | =item * |
be39acb2 | 778 | |
eabfc7bc | 779 | Mention that C<study()> is currently a no-op. |
be39acb2 SH |
780 | |
781 | =item * | |
782 | ||
eabfc7bc RS |
783 | Calling C<delete> or C<exists> on array values is now described as "strongly |
784 | discouraged" rather than "deprecated". | |
be39acb2 | 785 | |
eabfc7bc | 786 | =item * |
7f9fef93 | 787 | |
eabfc7bc | 788 | Improve documentation of C<< our >>. |
be39acb2 | 789 | |
eabfc7bc | 790 | =item * |
be39acb2 | 791 | |
eabfc7bc RS |
792 | C<-l> now notes that it will return false if symlinks aren't supported by the |
793 | file system. | |
be39acb2 | 794 | |
eabfc7bc | 795 | L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523> |
be39acb2 SH |
796 | |
797 | =item * | |
798 | ||
eabfc7bc | 799 | Note that C<exec LIST> and C<system LIST> may fall back to the shell on |
d140c31c AC |
800 | Win32. Only the indirect-object syntax C<exec PROGRAM LIST> and |
801 | C<system PROGRAM LIST> will reliably avoid using the shell. | |
eabfc7bc RS |
802 | |
803 | This has also been noted in L<perlport>. | |
804 | ||
805 | L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046> | |
be39acb2 | 806 | |
7f9fef93 | 807 | =back |
be39acb2 | 808 | |
eabfc7bc RS |
809 | =head3 L<perlguts> |
810 | ||
811 | =over 4 | |
812 | ||
813 | =item * | |
814 | ||
815 | The OOK example has been updated to account for COW changes and a change in the | |
816 | storage of the offset. | |
817 | ||
818 | =item * | |
be39acb2 | 819 | |
eabfc7bc | 820 | Details on C level symbols and libperl.t added. |
be39acb2 | 821 | |
ce93e38b KW |
822 | =item * |
823 | ||
824 | Information on Unicode handling has been added | |
825 | ||
826 | =item * | |
827 | ||
828 | Information on EBCDIC handling has been added | |
829 | ||
eabfc7bc RS |
830 | =back |
831 | ||
7595828f KW |
832 | =head3 L<perlhack> |
833 | ||
834 | =over 4 | |
835 | ||
836 | =item * | |
837 | ||
838 | A note has been added about running on platforms with non-ASCII | |
839 | character sets | |
840 | ||
841 | =item * | |
842 | ||
843 | A note has been added about performance testing | |
844 | ||
845 | =back | |
846 | ||
eabfc7bc | 847 | =head3 L<perlhacktips> |
7f9fef93 SH |
848 | |
849 | =over 4 | |
be39acb2 SH |
850 | |
851 | =item * | |
852 | ||
d140c31c AC |
853 | Documentation has been added illustrating the perils of assuming that |
854 | there is no change to the contents of static memory pointed to by the | |
855 | return values of Perl's wrappers for C library functions. | |
eabfc7bc RS |
856 | |
857 | =item * | |
858 | ||
d140c31c AC |
859 | Replacements for C<tmpfile>, C<atoi>, C<strtol>, and C<strtoul> are now |
860 | recommended. | |
eabfc7bc RS |
861 | |
862 | =item * | |
863 | ||
864 | Updated documentation for the C<test.valgrind> C<make> target. | |
865 | ||
866 | L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431> | |
be39acb2 | 867 | |
7595828f KW |
868 | =item * |
869 | ||
870 | Information is given about writing test files portably to non-ASCII | |
871 | platforms. | |
872 | ||
873 | =item * | |
874 | ||
875 | A note has been added about how to get a C language stack backtrace. | |
876 | ||
877 | =back | |
878 | ||
879 | =head3 L<perlhpux> | |
880 | ||
881 | =over 4 | |
882 | ||
883 | =item * | |
884 | ||
885 | Note that the message "Redeclaration of "sendpath" with a different | |
886 | storage class specifier" is harmless. | |
887 | ||
888 | =back | |
889 | ||
890 | =head3 L<perllocale> | |
891 | ||
892 | =over 4 | |
893 | ||
894 | =item * | |
895 | ||
896 | Updated for the enhancements in v5.22, along with some clarifications. | |
897 | ||
a9c3e753 | 898 | =back |
ea13b07e | 899 | |
eabfc7bc | 900 | =head3 L<perlmodstyle> |
0d42058e | 901 | |
7f9fef93 SH |
902 | =over 4 |
903 | ||
904 | =item * | |
2a7a05b4 | 905 | |
eabfc7bc RS |
906 | Instead of pointing to the module list, we are now pointing to |
907 | L<PrePAN|http://prepan.org/>. | |
2a7a05b4 | 908 | |
7f9fef93 SH |
909 | =back |
910 | ||
7595828f KW |
911 | =head3 L<perlop> |
912 | ||
913 | =over 4 | |
914 | ||
915 | =item * | |
916 | ||
917 | Updated for the enhancements in v5.22, along with some clarifications. | |
918 | ||
919 | =back | |
920 | ||
921 | =head3 L<perlpodspec> | |
922 | ||
923 | =over 4 | |
924 | ||
925 | =item * | |
926 | ||
927 | The specification of the pod language is changing so that the default | |
928 | encoding of pods that aren't in UTF-8 (unless otherwise indicated) is | |
929 | CP1252 instead of ISO 8859-1 (Latin1). | |
930 | ||
931 | =back | |
932 | ||
eabfc7bc RS |
933 | =head3 L<perlpolicy> |
934 | ||
935 | =over 4 | |
936 | ||
937 | =item * | |
938 | ||
939 | We now have a code of conduct for the I<< p5p >> mailing list, as documented | |
940 | in L<< perlpolicy/STANDARDS OF CONDUCT >>. | |
2a7a05b4 | 941 | |
eabfc7bc RS |
942 | =item * |
943 | ||
944 | The conditions for marking an experimental feature as non-experimental are now | |
945 | set out. | |
946 | ||
7595828f KW |
947 | =item * |
948 | ||
949 | Clarification has been made as to what sorts of changes are permissible in | |
950 | maintenance releases. | |
951 | ||
eabfc7bc RS |
952 | =back |
953 | ||
954 | =head3 L<perlport> | |
955 | ||
956 | =over 4 | |
957 | ||
958 | =item * | |
959 | ||
d140c31c | 960 | Out-of-date VMS-specific information has been fixed and/or simplified. |
eabfc7bc | 961 | |
ce93e38b KW |
962 | =item * |
963 | ||
964 | Notes about EBCDIC have been added. | |
965 | ||
eabfc7bc RS |
966 | =back |
967 | ||
968 | =head3 L<perlre> | |
969 | ||
970 | =over 4 | |
971 | ||
972 | =item * | |
973 | ||
d140c31c | 974 | The description of the C</x> modifier has been clarified to note that |
7595828f KW |
975 | comments cannot be continued onto the next line by escaping them; and |
976 | there is now a list of all the characters that are considered whitespace | |
977 | by this modifier. | |
978 | ||
979 | =item * | |
980 | ||
981 | The new C</n> modifier is described. | |
982 | ||
983 | =item * | |
984 | ||
985 | A note has been added on how to make bracketed character class ranges | |
986 | portable to non-ASCII machines. | |
eabfc7bc RS |
987 | |
988 | =back | |
989 | ||
990 | =head3 L<perlrebackslash> | |
991 | ||
992 | =over 4 | |
993 | ||
994 | =item * | |
995 | ||
996 | Added documentation of C<\b{sb}>, C<\b{wb}>, C<\b{gcb}>, and C<\b{g}>. | |
997 | ||
998 | =back | |
999 | ||
1000 | =head3 L<perlrecharclass> | |
1001 | ||
1002 | =over 4 | |
1003 | ||
1004 | =item * | |
1005 | ||
1006 | Clarifications have been added to L<perlrecharclass/Character Ranges> | |
1007 | to the effect that Perl guarantees that C<[A-Z]>, C<[a-z]>, C<[0-9]> and | |
1008 | any subranges thereof in regular expression bracketed character classes | |
1009 | are guaranteed to match exactly what a naive English speaker would | |
1010 | expect them to match, even on platforms (such as EBCDIC) where special | |
1011 | handling is required to accomplish this. | |
1012 | ||
1013 | =item * | |
1014 | ||
1015 | The documentation of Bracketed Character Classes has been expanded to cover the | |
1016 | improvements in C<qr/[\N{named sequence}]/> (see under L</Selected Bug Fixes>). | |
1017 | ||
1018 | =back | |
1019 | ||
7595828f KW |
1020 | =head3 L<perlref> |
1021 | ||
1022 | =over 4 | |
1023 | ||
1024 | =item * | |
1025 | ||
1026 | A new section has been added | |
1027 | L<Assigning to References|perlref/Assigning to References> | |
1028 | ||
1029 | =back | |
1030 | ||
eabfc7bc RS |
1031 | =head3 L<perlsec> |
1032 | ||
1033 | =over 4 | |
1034 | ||
1035 | =item * | |
1036 | ||
1037 | Comments added on algorithmic complexity and tied hashes. | |
1038 | ||
1039 | =back | |
1040 | ||
1041 | =head3 L<perlsyn> | |
1042 | ||
1043 | =over 4 | |
1044 | ||
1045 | =item * | |
1046 | ||
1047 | An ambiguity in the documentation of the C<...> statement has been corrected. | |
1048 | L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661> | |
1049 | ||
1050 | =item * | |
1051 | ||
1052 | The empty conditional in C<< for >> and C<< while >> is now documented | |
1053 | in L<< perlsyn >>. | |
1054 | ||
1055 | =back | |
1056 | ||
1057 | =head3 L<perlunicode> | |
1058 | ||
1059 | =over 4 | |
1060 | ||
1061 | =item * | |
1062 | ||
ce93e38b | 1063 | This has had extensive revisions to bring it up-to-date with current |
7595828f KW |
1064 | Unicode support and to make it more readable. Notable is that Unicode |
1065 | 7.0 changed what it should do with non-characters. Perl retains the old | |
1066 | way of handling for reasons of backward compatibility. See | |
1067 | L<perlunicode/Noncharacter code points>. | |
eabfc7bc RS |
1068 | |
1069 | =back | |
1070 | ||
1071 | =head3 L<perluniintro> | |
1072 | ||
1073 | =over 4 | |
1074 | ||
1075 | =item * | |
1076 | ||
1077 | Advice for how to make sure your strings and regular expression patterns are | |
ce93e38b | 1078 | interpreted as Unicode has been updated. |
eabfc7bc RS |
1079 | |
1080 | =back | |
1081 | ||
1082 | =head3 L<perlvar> | |
1083 | ||
1084 | =over 4 | |
1085 | ||
1086 | =item * | |
1087 | ||
7595828f KW |
1088 | C<$]> is no longer listed as being deprecated. Instead, discussion has |
1089 | been added on the advantages and disadvantages of using it versus | |
1090 | C<$^V>. | |
1091 | ||
1092 | =item * | |
1093 | ||
1094 | C<${^ENCODING}> is now marked as deprecated. | |
1095 | ||
1096 | =item * | |
1097 | ||
1098 | The entry for C<%^H> has been clarified to indicate it can only handle | |
1099 | simple values. | |
eabfc7bc RS |
1100 | |
1101 | =back | |
1102 | ||
1103 | =head3 L<perlvms> | |
1104 | ||
1105 | =over 4 | |
1106 | ||
1107 | =item * | |
1108 | ||
1109 | Out-of-date and/or incorrect material has been removed. | |
1110 | ||
1111 | =item * | |
1112 | ||
1113 | Updated documentation on environment and shell interaction in VMS. | |
1114 | ||
1115 | =back | |
1116 | ||
1117 | =head3 L<perlxs> | |
1118 | ||
1119 | =over 4 | |
1120 | ||
1121 | =item * | |
1122 | ||
1123 | Added a discussion of locale issues in XS code. | |
1124 | ||
1125 | =back | |
1126 | ||
1127 | =head1 Diagnostics | |
1128 | ||
1129 | The following additions or changes have been made to diagnostic output, | |
1130 | including warnings and fatal error messages. For the complete list of | |
1131 | diagnostic messages, see L<perldiag>. | |
1132 | ||
1133 | =head2 New Diagnostics | |
1134 | ||
1135 | =head3 New Errors | |
1136 | ||
1137 | =over 4 | |
1138 | ||
1139 | =item * | |
1140 | ||
1141 | L<Bad symbol for scalar|perldiag/"Bad symbol for scalar"> | |
1142 | ||
1143 | (P) An internal request asked to add a scalar entry to something that | |
1144 | wasn't a symbol table entry. | |
1145 | ||
1146 | =item * | |
1147 | ||
1148 | L<Can't use a hash as a reference|perldiag/"Can't use a hash as a reference"> | |
1149 | ||
1150 | (F) You tried to use a hash as a reference, as in | |
1151 | C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl E<lt>= 5.6.1 | |
1152 | used to allow this syntax, but shouldn't have. | |
1153 | ||
1154 | =item * | |
1155 | ||
1156 | L<Can't use an array as a reference|perldiag/"Can't use an array as a reference"> | |
1157 | ||
1158 | (F) You tried to use an array as a reference, as in | |
1159 | C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl E<lt>= 5.6.1 used to | |
1160 | allow this syntax, but shouldn't have. | |
1161 | ||
1162 | =item * | |
1163 | ||
1164 | L<Can't use 'defined(@array)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(@array)' (Maybe you should just omit the defined()?)"> | |
1165 | ||
4ec8e6f0 | 1166 | (F) C<defined()> is not useful on arrays because it |
eabfc7bc | 1167 | checks for an undefined I<scalar> value. If you want to see if the |
4ec8e6f0 | 1168 | array is empty, just use S<C<if (@array) { # not empty }>> for example. |
eabfc7bc RS |
1169 | |
1170 | =item * | |
1171 | ||
1172 | L<Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)"> | |
1173 | ||
1174 | (F) C<defined()> is not usually right on hashes. | |
1175 | ||
4ec8e6f0 | 1176 | Although S<C<defined %hash>> is false on a plain not-yet-used hash, it |
eabfc7bc | 1177 | becomes true in several non-obvious circumstances, including iterators, |
4ec8e6f0 KW |
1178 | weak references, stash names, even remaining true after S<C<undef %hash>>. |
1179 | These things make S<C<defined %hash>> fairly useless in practice, so it now | |
eabfc7bc RS |
1180 | generates a fatal error. |
1181 | ||
1182 | If a check for non-empty is what you wanted then just put it in boolean | |
1183 | context (see L<perldata/Scalar values>): | |
1184 | ||
1185 | if (%hash) { | |
1186 | # not empty | |
1187 | } | |
1188 | ||
4ec8e6f0 | 1189 | If you had S<C<defined %Foo::Bar::QUUX>> to check whether such a package |
eabfc7bc RS |
1190 | variable exists then that's never really been reliable, and isn't |
1191 | a good way to enquire about the features of a package, or whether | |
1192 | it's loaded, etc. | |
1193 | ||
1194 | =item * | |
1195 | ||
1196 | L<Cannot chr %f|perldiag/"Cannot chr %f"> | |
1197 | ||
c21a1c59 RS |
1198 | (F) You passed an invalid number (like an infinity or not-a-number) to |
1199 | C<chr>. | |
1200 | ||
eabfc7bc RS |
1201 | =item * |
1202 | ||
1203 | L<Cannot compress %f in pack|perldiag/"Cannot compress %f in pack"> | |
1204 | ||
c21a1c59 RS |
1205 | (F) You tried converting an infinity or not-a-number to an unsigned |
1206 | character, which makes no sense. | |
1207 | ||
eabfc7bc RS |
1208 | =item * |
1209 | ||
1210 | L<Cannot pack %f with '%c'|perldiag/"Cannot pack %f with '%c'"> | |
1211 | ||
c21a1c59 RS |
1212 | (F) You tried converting an infinity or not-a-number to a character, |
1213 | which makes no sense. | |
1214 | ||
eabfc7bc RS |
1215 | =item * |
1216 | ||
1217 | L<Cannot print %f with '%c'|perldiag/"Cannot printf %f with '%c'"> | |
1218 | ||
4ec8e6f0 KW |
1219 | (F) You tried printing an infinity or not-a-number as a character (C<%c>), |
1220 | which makes no sense. Maybe you meant C<'%s'>, or just stringifying it? | |
c21a1c59 | 1221 | |
eabfc7bc RS |
1222 | =item * |
1223 | ||
1224 | L<charnames alias definitions may not contain a sequence of multiple spaces|perldiag/"charnames alias definitions may not contain a sequence of multiple spaces"> | |
1225 | ||
1226 | (F) You defined a character name which had multiple space | |
1227 | characters in a row. Change them to single spaces. Usually these | |
1228 | names are defined in the C<:alias> import argument to C<use charnames>, but | |
1229 | they could be defined by a translator installed into C<$^H{charnames}>. | |
1230 | See L<charnames/CUSTOM ALIASES>. | |
1231 | ||
1232 | =item * | |
1233 | ||
1234 | L<charnames alias definitions may not contain trailing white-space|perldiag/"charnames alias definitions may not contain trailing white-space"> | |
1235 | ||
1236 | (F) You defined a character name which ended in a space | |
1237 | character. Remove the trailing space(s). Usually these names are | |
1238 | defined in the C<:alias> import argument to C<use charnames>, but they | |
1239 | could be defined by a translator installed into C<$^H{charnames}>. | |
1240 | See L<charnames/CUSTOM ALIASES>. | |
1241 | ||
1242 | =item * | |
1243 | ||
1244 | L<:const is not permitted on named subroutines|perldiag/":const is not permitted on named subroutines"> | |
1245 | ||
1246 | (F) The "const" attribute causes an anonymous subroutine to be run and | |
f5b97b22 | 1247 | its value captured at the time that it is cloned. Named subroutines are |
eabfc7bc RS |
1248 | not cloned like this, so the attribute does not make sense on them. |
1249 | ||
1250 | =item * | |
1251 | ||
1252 | L<Hexadecimal float: internal error|perldiag/"Hexadecimal float: internal error"> | |
1253 | ||
1254 | (F) Something went horribly bad in hexadecimal float handling. | |
1255 | ||
1256 | =item * | |
1257 | ||
1258 | L<Hexadecimal float: unsupported long double format|perldiag/"Hexadecimal float: unsupported long double format"> | |
1259 | ||
1260 | (F) You have configured Perl to use long doubles but | |
1261 | the internals of the long double format are unknown, | |
1262 | therefore the hexadecimal float output is impossible. | |
1263 | ||
1264 | =item * | |
1265 | ||
1266 | L<Illegal suidscript|perldiag/"Illegal suidscript"> | |
1267 | ||
1268 | (F) The script run under suidperl was somehow illegal. | |
1269 | ||
1270 | =item * | |
1271 | ||
1272 | L<In '(?...)', the '(' and '?' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/"> | |
1273 | ||
1274 | (F) The two-character sequence C<"(?"> in | |
1275 | this context in a regular expression pattern should be an | |
1276 | indivisible token, with nothing intervening between the C<"("> | |
1277 | and the C<"?">, but you separated them. | |
1278 | ||
1279 | =item * | |
1280 | ||
1281 | L<In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/"> | |
1282 | ||
1283 | (F) The two-character sequence C<"(*"> in | |
1284 | this context in a regular expression pattern should be an | |
1285 | indivisible token, with nothing intervening between the C<"("> | |
1286 | and the C<"*">, but you separated them. | |
1287 | ||
1288 | =item * | |
1289 | ||
1290 | L<Invalid quantifier in {,} in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Invalid quantifier in {,} in regex; marked by <-- HERE in m/%s/"> | |
1291 | ||
1292 | (F) The pattern looks like a {min,max} quantifier, but the min or max could not | |
1293 | be parsed as a valid number - either it has leading zeroes, or it represents | |
1294 | too big a number to cope with. The S<<-- HERE> shows where in the regular | |
1295 | expression the problem was discovered. See L<perlre>. | |
1296 | ||
1297 | =back | |
1298 | ||
1299 | =head3 New Warnings | |
1300 | ||
1301 | =over 4 | |
1302 | ||
1303 | =item * | |
1304 | ||
43831b1f DM |
1305 | L<\C is deprecated in regex|perldiag/"\C is deprecated in regex; marked by <-- HERE in m/%s/"> |
1306 | ||
1307 | (D deprecated) The C<< /\C/ >> character class was deprecated in v5.20, and | |
1308 | now emits a warning. It is intended that it will become an error in v5.24. | |
1309 | This character class matches a single byte even if it appears within a | |
50ea4745 | 1310 | multi-byte character, breaks encapsulation, and can corrupt UTF-8 |
43831b1f DM |
1311 | strings. |
1312 | ||
1313 | =item * | |
1314 | ||
eabfc7bc RS |
1315 | L<'%s' is an unknown bound type in regex|perldiag/"'%s' is an unknown bound type in regex; marked by <-- HERE in m/%s/"> |
1316 | ||
1317 | You used C<\b{...}> or C<\B{...}> and the C<...> is not known to | |
1318 | Perl. The current valid ones are given in | |
1319 | L<perlrebackslash/\b{}, \b, \B{}, \B>. | |
1320 | ||
1321 | =item * | |
1322 | ||
1323 | L<"%s" is more clearly written simply as "%s" in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"%s" is more clearly written simply as "%s" in regex; marked by <-- HERE in mE<sol>%sE<sol>> | |
1324 | ||
1325 | (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>) | |
1326 | ||
1327 | You specified a character that has the given plainer way of writing it, | |
1328 | and which is also portable to platforms running with different character | |
1329 | sets. | |
1330 | ||
1331 | =item * | |
1332 | ||
1333 | L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated | |
1334 | as 0 in increment (++)"> | |
1335 | ||
1336 | (W numeric) The indicated string was fed as an argument to the C<++> operator | |
1337 | which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>. | |
1338 | See L<perlop/Auto-increment and Auto-decrement> for details. | |
1339 | ||
1340 | =item * | |
1341 | ||
1342 | L<Both or neither range ends should be Unicode in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Both or neither range ends should be Unicode in regex; marked by <-- HERE in m/%s/"> | |
1343 | ||
1344 | (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>) | |
1345 | ||
1346 | In a bracketed character class in a regular expression pattern, you | |
1347 | had a range which has exactly one end of it specified using C<\N{}>, and | |
1348 | the other end is specified using a non-portable mechanism. Perl treats | |
1349 | the range as a Unicode range, that is, all the characters in it are | |
1350 | considered to be the Unicode characters, and which may be different code | |
1351 | points on some platforms Perl runs on. For example, C<[\N{U+06}-\x08]> | |
1352 | is treated as if you had instead said C<[\N{U+06}-\N{U+08}]>, that is it | |
1353 | matches the characters whose code points in Unicode are 6, 7, and 8. | |
1354 | But that C<\x08> might indicate that you meant something different, so | |
1355 | the warning gets raised. | |
1356 | ||
1357 | =item * | |
1358 | ||
eabfc7bc RS |
1359 | L<:const is experimental|perldiag/":const is experimental"> |
1360 | ||
1361 | (S experimental::const_attr) The "const" attribute is experimental. | |
1362 | If you want to use the feature, disable the warning with C<no warnings | |
1363 | 'experimental::const_attr'>, but know that in doing so you are taking | |
1364 | the risk that your code may break in a future Perl version. | |
1365 | ||
1366 | =item * | |
1367 | ||
1368 | L<gmtime(%f) failed|perldiag/"gmtime(%f) failed"> | |
1369 | ||
1370 | (W overflow) You called C<gmtime> with a number that it could not handle: | |
1371 | too large, too small, or NaN. The returned value is C<undef>. | |
1372 | ||
1373 | =item * | |
1374 | ||
1375 | L<Hexadecimal float: exponent overflow|perldiag/"Hexadecimal float: exponent overflow"> | |
1376 | ||
1377 | (W overflow) The hexadecimal floating point has larger exponent | |
1378 | than the floating point supports. | |
1379 | ||
1380 | =item * | |
1381 | ||
1382 | L<Hexadecimal float: exponent underflow|perldiag/"Hexadecimal float: exponent underflow"> | |
1383 | ||
1384 | (W overflow) The hexadecimal floating point has smaller exponent | |
1385 | than the floating point supports. | |
1386 | ||
1387 | =item * | |
1388 | ||
1389 | L<Hexadecimal float: mantissa overflow|perldiag/"Hexadecimal float: mantissa overflow"> | |
1390 | ||
1391 | (W overflow) The hexadecimal floating point literal had more bits in | |
1392 | the mantissa (the part between the 0x and the exponent, also known as | |
1393 | the fraction or the significand) than the floating point supports. | |
1394 | ||
1395 | =item * | |
1396 | ||
1397 | L<Hexadecimal float: precision loss|perldiag/"Hexadecimal float: precision loss"> | |
1398 | ||
1399 | (W overflow) The hexadecimal floating point had internally more | |
1400 | digits than could be output. This can be caused by unsupported | |
1401 | long double formats, or by 64-bit integers not being available | |
1402 | (needed to retrieve the digits under some configurations). | |
1403 | ||
eabfc7bc RS |
1404 | =item * |
1405 | ||
1406 | L<localtime(%f) failed|perldiag/"localtime(%f) failed"> | |
1407 | ||
1408 | (W overflow) You called C<localtime> with a number that it could not handle: | |
1409 | too large, too small, or NaN. The returned value is C<undef>. | |
1410 | ||
1411 | =item * | |
1412 | ||
1413 | L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing"> | |
1414 | ||
1415 | (W numeric) You tried to execute the | |
1416 | L<C<x>|perlop/Multiplicative Operators> repetition operator fewer than 0 | |
1417 | times, which doesn't make sense. | |
1418 | ||
1419 | =item * | |
1420 | ||
1421 | L<NO-BREAK SPACE in a charnames alias definition is deprecated|perldiag/"NO-BREAK SPACE in a charnames alias definition is deprecated"> | |
1422 | ||
1423 | (D deprecated) You defined a character name which contained a no-break | |
1424 | space character. Change it to a regular space. Usually these names are | |
1425 | defined in the C<:alias> import argument to C<use charnames>, but they | |
1426 | could be defined by a translator installed into C<$^H{charnames}>. See | |
1427 | L<charnames/CUSTOM ALIASES>. | |
1428 | ||
1429 | =item * | |
1430 | ||
1431 | L<Non-finite repeat count does nothing|perldiag/"Non-finite repeat count does nothing"> | |
1432 | ||
1433 | (W numeric) You tried to execute the | |
1434 | L<C<x>|perlop/Multiplicative Operators> repetition operator C<Inf> (or | |
3209f716 | 1435 | C<-Inf>) or NaN times, which doesn't make sense. |
eabfc7bc RS |
1436 | |
1437 | =item * | |
1438 | ||
1439 | L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental"> | |
1440 | ||
1441 | (S experimental::win32_perlio) The C<:win32> PerlIO layer is | |
1442 | experimental. If you want to take the risk of using this layer, | |
1443 | simply disable this warning: | |
1444 | ||
1445 | no warnings "experimental::win32_perlio"; | |
1446 | ||
1447 | =item * | |
1448 | ||
1449 | L<Ranges of ASCII printables should be some subset of "0-9", "A-Z", or "a-z" in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Ranges of ASCII printables should be some subset of "0-9", "A-Z", or "a-z" in regex; marked by <-- HERE in mE<sol>%sE<sol>"> | |
1450 | ||
1451 | (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>) | |
1452 | ||
1453 | Stricter rules help to find typos and other errors. Perhaps you didn't | |
1454 | even intend a range here, if the C<"-"> was meant to be some other | |
1455 | character, or should have been escaped (like C<"\-">). If you did | |
1456 | intend a range, the one that was used is not portable between ASCII and | |
1457 | EBCDIC platforms, and doesn't have an obvious meaning to a casual | |
1458 | reader. | |
1459 | ||
1460 | [3-7] # OK; Obvious and portable | |
1461 | [d-g] # OK; Obvious and portable | |
1462 | [A-Y] # OK; Obvious and portable | |
1463 | [A-z] # WRONG; Not portable; not clear what is meant | |
1464 | [a-Z] # WRONG; Not portable; not clear what is meant | |
1465 | [%-.] # WRONG; Not portable; not clear what is meant | |
1466 | [\x41-Z] # WRONG; Not portable; not obvious to non-geek | |
1467 | ||
1468 | (You can force portability by specifying a Unicode range, which means that | |
1469 | the endpoints are specified by | |
1470 | L<C<\N{...}>|perlrecharclass/Character Ranges>, but the meaning may | |
1471 | still not be obvious.) | |
1472 | The stricter rules require that ranges that start or stop with an ASCII | |
93780ae6 | 1473 | character that is not a control have all their endpoints be a literal |
eabfc7bc RS |
1474 | character, and not some escape sequence (like C<"\x41">), and the ranges |
1475 | must be all digits, or all uppercase letters, or all lowercase letters. | |
1476 | ||
1477 | =item * | |
1478 | ||
1479 | L<Ranges of digits should be from the same group in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Ranges of digits should be from the same group in regex; marked by <-- HERE in m/%s/"> | |
1480 | ||
1481 | (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>) | |
1482 | ||
1483 | Stricter rules help to find typos and other errors. You included a | |
1484 | range, and at least one of the end points is a decimal digit. Under the | |
1485 | stricter rules, when this happens, both end points should be digits in | |
1486 | the same group of 10 consecutive digits. | |
1487 | ||
1488 | =item * | |
1489 | ||
1490 | L<Redundant argument in %s|perldiag/Redundant argument in %s> | |
1491 | ||
f5b97b22 DM |
1492 | (W redundant) You called a function with more arguments than were |
1493 | needed, as indicated by information within other arguments you supplied | |
1494 | (e.g. a printf format). Currently only emitted when a printf-type format | |
1495 | required fewer arguments than were supplied, but might be used in the | |
1496 | future for e.g. L<perlfunc/pack>. | |
eabfc7bc | 1497 | |
a75e6a3a SH |
1498 | The warnings category C<< redundant >> is new. See also |
1499 | L<[perl #121025]|https://rt.perl.org/Ticket/Display.html?id=121025>. | |
eabfc7bc RS |
1500 | |
1501 | =item * | |
1502 | ||
1503 | L<Use of \b{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale|perldiag/"Use of \b{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale"> | |
1504 | ||
1505 | You are matching a regular expression using locale rules, | |
1506 | and a Unicode boundary is being matched, but the locale is not a Unicode | |
1507 | one. This doesn't make sense. Perl will continue, assuming a Unicode | |
1508 | (UTF-8) locale, but the results could well be wrong except if the locale | |
1509 | happens to be ISO-8859-1 (Latin1) where this message is spurious and can | |
1510 | be ignored. | |
1511 | ||
1512 | =item * | |
1513 | ||
1514 | L<< Using E<sol>u for '%s' instead of E<sol>%s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Using E<sol>u for '%s' instead of E<sol>%s in regex; marked by <-- HERE in mE<sol>%sE<sol>" >> | |
1515 | ||
1516 | You used a Unicode boundary (C<\b{...}> or C<\B{...}>) in a | |
1517 | portion of a regular expression where the character set modifiers C</a> | |
1518 | or C</aa> are in effect. These two modifiers indicate an ASCII | |
1519 | interpretation, and this doesn't make sense for a Unicode definition. | |
1520 | The generated regular expression will compile so that the boundary uses | |
1521 | all of Unicode. No other portion of the regular expression is affected. | |
1522 | ||
1523 | =item * | |
1524 | ||
1525 | L<The bitwise feature is experimental|perldiag/"The bitwise feature is experimental"> | |
1526 | ||
1527 | This warning is emitted if you use bitwise | |
1528 | operators (C<& | ^ ~ &. |. ^. ~.>) with the "bitwise" feature enabled. | |
1529 | Simply suppress the warning if you want to use the feature, but know | |
1530 | that in doing so you are taking the risk of using an experimental | |
1531 | feature which may change or be removed in a future Perl version: | |
1532 | ||
1533 | no warnings "experimental::bitwise"; | |
1534 | use feature "bitwise"; | |
1535 | $x |.= $y; | |
1536 | ||
1537 | =item * | |
1538 | ||
1539 | L<Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/"> | |
1540 | ||
1541 | (D deprecated, regexp) You used a literal C<"{"> character in a regular | |
1542 | expression pattern. You should change to use C<"\{"> instead, because a future | |
1543 | version of Perl (tentatively v5.26) will consider this to be a syntax error. If | |
1544 | the pattern delimiters are also braces, any matching right brace | |
1545 | (C<"}">) should also be escaped to avoid confusing the parser, for | |
1546 | example, | |
1547 | ||
1548 | qr{abc\{def\}ghi} | |
1549 | ||
1550 | =item * | |
1551 | ||
1552 | L<Use of literal non-graphic characters in variable names is deprecated|perldiag/"Use of literal non-graphic characters in variable names is deprecated"> | |
1553 | ||
b0511669 DM |
1554 | (D deprecated) Using literal non-graphic (including control) |
1555 | characters in the source to refer to the ^FOO variables, like C<$^X> and | |
1556 | C<${^GLOBAL_PHASE}> is now deprecated. | |
1557 | ||
eabfc7bc RS |
1558 | =item * |
1559 | ||
1560 | L<Useless use of attribute "const"|perldiag/Useless use of attribute "const"> | |
1561 | ||
1562 | (W misc) The "const" attribute has no effect except | |
1563 | on anonymous closure prototypes. You applied it to | |
1564 | a subroutine via L<attributes.pm|attributes>. This is only useful | |
1565 | inside an attribute handler for an anonymous subroutine. | |
1566 | ||
1567 | =item * | |
1568 | ||
1569 | L<E<quot>use re 'strict'E<quot> is experimental|perldiag/"use re 'strict'" is experimental> | |
1570 | ||
1571 | (S experimental::re_strict) The things that are different when a regular | |
1572 | expression pattern is compiled under C<'strict'> are subject to change | |
1573 | in future Perl releases in incompatible ways. This means that a pattern | |
1574 | that compiles today may not in a future Perl release. This warning is | |
1575 | to alert you to that risk. | |
1576 | ||
1577 | =item * | |
1578 | ||
caa16dbd TC |
1579 | L<Warning: unable to close filehandle properly: %s|perldiag/"Warning: unable to close filehandle properly: %s"> |
1580 | ||
eabfc7bc RS |
1581 | L<Warning: unable to close filehandle %s properly: %s|perldiag/"Warning: unable to close filehandle %s properly: %s"> |
1582 | ||
b0511669 DM |
1583 | (S io) Previously perl silently ignored any errors when doing an implicit |
1584 | close of a filehandle, i.e. where the reference count of the filehandle | |
1585 | reached zero and the user's code hadn't already called C<close()>; e.g. | |
1586 | ||
1587 | { | |
1588 | open my $fh, '>', $file or die "open: '$file': $!\n"; | |
1589 | print $fh, $data or die; | |
1590 | } # implicit close here | |
1591 | ||
1592 | In a situation such as disk full, due to buffering the error may only be | |
1593 | detected during the final close, so not checking the result of the close is | |
1594 | dangerous. | |
1595 | ||
1596 | So perl now warns in such situations. | |
caa16dbd | 1597 | |
eabfc7bc RS |
1598 | =item * |
1599 | ||
1600 | L<Wide character (U+%X) in %s|perldiag/"Wide character (U+%X) in %s"> | |
1601 | ||
1602 | (W locale) While in a single-byte locale (I<i.e.>, a non-UTF-8 | |
1603 | one), a multi-byte character was encountered. Perl considers this | |
50ea4745 | 1604 | character to be the specified Unicode code point. Combining non-UTF-8 |
eabfc7bc RS |
1605 | locales and Unicode is dangerous. Almost certainly some characters |
1606 | will have two different representations. For example, in the ISO 8859-7 | |
1607 | (Greek) locale, the code point 0xC3 represents a Capital Gamma. But so | |
1608 | also does 0x393. This will make string comparisons unreliable. | |
1609 | ||
1610 | You likely need to figure out how this multi-byte character got mixed up | |
1611 | with your single-byte locale (or perhaps you thought you had a UTF-8 | |
1612 | locale, but Perl disagrees). | |
1613 | ||
1614 | =item * | |
1615 | ||
1616 | The following two warnings for C<tr///> used to be skipped if the | |
1617 | transliteration contained wide characters, but now they occur regardless of | |
1618 | whether there are wide characters or not: | |
1619 | ||
1620 | L<Useless use of E<sol>d modifier in transliteration operator|perldiag/"Useless use of /d modifier in transliteration operator"> | |
1621 | ||
1622 | L<Replacement list is longer than search list|perldiag/Replacement list is longer than search list> | |
1623 | ||
1624 | =item * | |
1625 | ||
1626 | A new C<locale> warning category has been created, with the following warning | |
1627 | messages currently in it: | |
1628 | ||
1629 | =over 4 | |
1630 | ||
1631 | =item * | |
1632 | ||
1633 | L<Locale '%s' may not work well.%s|perldiag/Locale '%s' may not work well.%s> | |
1634 | ||
b0511669 DM |
1635 | (W locale) You are using the named locale, which is a non-UTF-8 one, and |
1636 | which Perl has determined is not fully compatible with Perl. The second | |
1637 | C<%s> gives a reason. | |
1638 | ||
eabfc7bc RS |
1639 | =item * |
1640 | ||
1641 | L<Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".|perldiag/Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".> | |
1642 | ||
b0511669 DM |
1643 | (W locale) You are 1) running under "C<use locale>"; 2) the current |
1644 | locale is not a UTF-8 one; 3) you tried to do the designated case-change | |
1645 | operation on the specified Unicode character; and 4) the result of this | |
1646 | operation would mix Unicode and locale rules, which likely conflict. | |
1647 | ||
eabfc7bc RS |
1648 | =back |
1649 | ||
b0511669 DM |
1650 | =item * |
1651 | ||
1652 | L<Missing or undefined argument to require|perldiag/Missing or undefined argument to require> | |
1653 | ||
3209f716 KW |
1654 | (F) You tried to call C<require> with no argument or with an undefined |
1655 | value as an argument. C<require> expects either a package name or a | |
b0511669 DM |
1656 | file-specification as an argument. See L<perlfunc/require>. |
1657 | ||
3209f716 | 1658 | Formerly, C<require> with no argument or C<undef> warned about a Null filename. |
b0511669 | 1659 | |
eabfc7bc RS |
1660 | =back |
1661 | ||
1662 | =head2 Changes to Existing Diagnostics | |
1663 | ||
1664 | =over 4 | |
1665 | ||
1666 | =item * | |
1667 | ||
1668 | <> should be quotes | |
1669 | ||
1670 | This warning has been changed to | |
1671 | L<< <> at require-statement should be quotes|perldiag/"<> at require-statement should be quotes" >> | |
1672 | to make the issue more identifiable. | |
1673 | ||
1674 | =item * | |
1675 | ||
1676 | L<Argument "%s" isn't numeric%s|perldiag/"Argument "%s" isn't numeric%s"> | |
b0511669 DM |
1677 | |
1678 | The L<perldiag> entry for this warning has added this clarifying note: | |
eabfc7bc | 1679 | |
4ec8e6f0 | 1680 | Note that for the Inf and NaN (infinity and not-a-number) the |
77c2376a KW |
1681 | definition of "numeric" is somewhat unusual: the strings themselves |
1682 | (like "Inf") are considered numeric, and anything following them is | |
1683 | considered non-numeric. | |
eabfc7bc RS |
1684 | |
1685 | =item * | |
1686 | ||
1687 | L<Global symbol "%s" requires explicit package name|perldiag/"Global symbol "%s" requires explicit package name (did you forget to declare "my %s"?)"> | |
1688 | ||
1689 | This message has had '(did you forget to declare "my %s"?)' appended to it, to | |
1690 | make it more helpful to new Perl programmers. | |
1691 | L<[perl #121638]|https://rt.perl.org/Ticket/Display.html?id=121638> | |
1692 | ||
1693 | =item * | |
1694 | ||
1695 | '"my" variable &foo::bar can't be in a package' has been reworded to say | |
1696 | 'subroutine' instead of 'variable'. | |
1697 | ||
1698 | =item * | |
1699 | ||
b0511669 DM |
1700 | L<<< \N{} in character class restricted to one character in regex; marked by |
1701 | S<< <-- HERE >> in mE<sol>%sE<sol>|perldiag/"\N{} in inverted character | |
1702 | class or as a range end-point is restricted to one character in regex; | |
1703 | marked by <-- HERE in m/%s/" >>> | |
eabfc7bc | 1704 | |
b0511669 DM |
1705 | This message has had I<character class> changed to I<inverted character |
1706 | class or as a range end-point is> to reflect improvements in | |
1707 | C<qr/[\N{named sequence}]/> (see under L</Selected Bug Fixes>). | |
eabfc7bc RS |
1708 | |
1709 | =item * | |
1710 | ||
1711 | L<panic: frexp|perldiag/"panic: frexp: %f"> | |
1712 | ||
b0511669 DM |
1713 | This message has had ': C<%f>' appended to it, to show what the offending |
1714 | floating point number is. | |
eabfc7bc RS |
1715 | |
1716 | =item * | |
1717 | ||
b0511669 | 1718 | I<Possible precedence problem on bitwise %c operator> reworded as |
eabfc7bc RS |
1719 | L<Possible precedence problem on bitwise %s operator|perldiag/"Possible precedence problem on bitwise %s operator">. |
1720 | ||
1721 | =item * | |
1722 | ||
eabfc7bc RS |
1723 | L<Unsuccessful %s on filename containing newline|perldiag/"Unsuccessful %s on filename containing newline"> |
1724 | ||
1725 | This warning is now only produced when the newline is at the end of | |
1726 | the filename. | |
1727 | ||
1728 | =item * | |
1729 | ||
4ec8e6f0 | 1730 | "Variable C<%s> will not stay shared" has been changed to say "Subroutine" |
eabfc7bc RS |
1731 | when it is actually a lexical sub that will not stay shared. |
1732 | ||
1733 | =item * | |
1734 | ||
1735 | L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/"> | |
1736 | ||
b0511669 DM |
1737 | The L<perldiag> entry for this warning has had information about Unicode |
1738 | behaviour added. | |
eabfc7bc RS |
1739 | |
1740 | =back | |
1741 | ||
1742 | =head2 Diagnostic Removals | |
1743 | ||
1744 | =over | |
1745 | ||
1746 | =item * | |
1747 | ||
1748 | "Ambiguous use of -foo resolved as -&foo()" | |
1749 | ||
1750 | There is actually no ambiguity here, and this impedes the use of negated | |
1751 | constants; e.g., C<-Inf>. | |
1752 | ||
1753 | =item * | |
1754 | ||
1755 | "Constant is not a FOO reference" | |
1756 | ||
1757 | Compile-time checking of constant dereferencing (e.g., C<< my_constant->() >>) | |
1758 | has been removed, since it was not taking overloading into account. | |
1759 | L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> | |
1760 | L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607> | |
1761 | ||
1762 | =back | |
1763 | ||
1764 | =head1 Utility Changes | |
1765 | ||
b0511669 | 1766 | =head2 F<find2perl>, F<s2p> and F<a2p> removal |
eabfc7bc RS |
1767 | |
1768 | =over 4 | |
1769 | ||
1770 | =item * | |
1771 | ||
1772 | The F<x2p/> directory has been removed from the Perl core. | |
1773 | ||
1774 | This removes find2perl, s2p and a2p. They have all been released to CPAN as | |
1775 | separate distributions (App::find2perl, App::s2p, App::a2p). | |
1776 | ||
1777 | =back | |
1778 | ||
1779 | =head2 L<h2ph> | |
1780 | ||
1781 | =over 4 | |
1782 | ||
1783 | =item * | |
1784 | ||
1785 | F<h2ph> now handles hexadecimal constants in the compiler's predefined | |
a75e6a3a SH |
1786 | macro definitions, as visible in C<$Config{cppsymbols}>. |
1787 | L<[perl #123784]|https://rt.perl.org/Ticket/Display.html?id=123784>. | |
eabfc7bc RS |
1788 | |
1789 | =back | |
1790 | ||
1791 | =head2 L<encguess> | |
1792 | ||
1793 | =over 4 | |
1794 | ||
1795 | =item * | |
1796 | ||
f1c9eac6 | 1797 | No longer depends on non-core modules. |
eabfc7bc RS |
1798 | |
1799 | =back | |
1800 | ||
1801 | =head1 Configuration and Compilation | |
1802 | ||
1803 | =over 4 | |
1804 | ||
1805 | =item * | |
1806 | ||
b0511669 DM |
1807 | F<Configure> now checks for C<lrintl()>, C<lroundl()>, C<llrintl()>, and |
1808 | C<llroundl()>. | |
eabfc7bc RS |
1809 | |
1810 | =item * | |
1811 | ||
a75e6a3a SH |
1812 | F<Configure> with C<-Dmksymlinks> should now be faster. |
1813 | L<[perl #122002]|https://rt.perl.org/Ticket/Display.html?id=122002>. | |
eabfc7bc RS |
1814 | |
1815 | =item * | |
1816 | ||
b0511669 DM |
1817 | The C<pthreads> and C<cl> libraries will be linked by default if present. |
1818 | This allows XS modules that require threading to work on non-threaded | |
1819 | perls. Note that you must still pass C<-Dusethreads> if you want a | |
1820 | threaded perl. | |
eabfc7bc RS |
1821 | |
1822 | =item * | |
1823 | ||
1824 | For long doubles (to get more precision and range for floating point numbers) | |
1825 | one can now use the GCC quadmath library which implements the quadruple | |
f1c9eac6 DM |
1826 | precision floating point numbers on x86 and IA-64 platforms. See |
1827 | F<INSTALL> for details. | |
eabfc7bc RS |
1828 | |
1829 | =item * | |
1830 | ||
1831 | MurmurHash64A and MurmurHash64B can now be configured as the internal hash | |
1832 | function. | |
1833 | ||
1834 | =item * | |
1835 | ||
1836 | C<make test.valgrind> now supports parallel testing. | |
1837 | ||
1838 | For example: | |
1839 | ||
1840 | TEST_JOBS=9 make test.valgrind | |
1841 | ||
1842 | See L<perlhacktips/valgrind> for more information. | |
1843 | ||
1844 | L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431> | |
1845 | ||
1846 | =item * | |
1847 | ||
1848 | The MAD (Misc Attribute Decoration) build option has been removed | |
1849 | ||
1850 | This was an unmaintained attempt at preserving | |
1851 | the Perl parse tree more faithfully so that automatic conversion of | |
1852 | Perl 5 to Perl 6 would have been easier. | |
1853 | ||
1854 | This build-time configuration option had been unmaintained for years, | |
1855 | and had probably seriously diverged on both Perl 5 and Perl 6 sides. | |
1856 | ||
1857 | =item * | |
1858 | ||
1859 | A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details, | |
1860 | see the discussion below at L<< /Internal Changes >>. | |
1861 | ||
43831b1f DM |
1862 | =item * |
1863 | ||
1864 | Pathtools no longer tries to load XS on miniperl. This speeds up building perl | |
1865 | slightly. | |
1866 | ||
eabfc7bc RS |
1867 | =back |
1868 | ||
1869 | =head1 Testing | |
1870 | ||
1871 | =over 4 | |
1872 | ||
1873 | =item * | |
1874 | ||
1875 | F<t/porting/re_context.t> has been added to test that L<utf8> and its | |
1876 | dependencies only use the subset of the C<$1..$n> capture vars that | |
b0511669 DM |
1877 | C<Perl_save_re_context()> is hard-coded to localize, because that function |
1878 | has no efficient way of determining at runtime what vars to localize. | |
eabfc7bc RS |
1879 | |
1880 | =item * | |
1881 | ||
1882 | Tests for performance issues have been added in the file F<t/perf/taint.t>. | |
1883 | ||
1884 | =item * | |
1885 | ||
1886 | Some regular expression tests are written in such a way that they will | |
1887 | run very slowly if certain optimizations break. These tests have been | |
1888 | moved into new files, F<< t/re/speed.t >> and F<< t/re/speed_thr.t >>, | |
1889 | and are run with a C<< watchdog() >>. | |
1890 | ||
1891 | =item * | |
1892 | ||
1893 | C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it | |
1894 | more compatible with C<< Test::More >>. | |
1895 | ||
1896 | =item * | |
1897 | ||
1898 | A new test script, F<op/infnan.t>, has been added to test if Inf and NaN are | |
1899 | working correctly. See L</Infinity and NaN (not-a-number) handling improved>. | |
1900 | ||
1901 | =back | |
1902 | ||
1903 | =head1 Platform Support | |
1904 | ||
1905 | =head2 Regained Platforms | |
1906 | ||
1907 | =over 4 | |
1908 | ||
1909 | =item IRIX and Tru64 platforms are working again. | |
1910 | ||
1911 | (Some C<make test> failures remain.) | |
1912 | ||
1913 | =item z/OS running EBCDIC Code Page 1047 | |
1914 | ||
1915 | Core perl now works on this EBCDIC platform. Earlier perls also worked, but, | |
1916 | even though support wasn't officially withdrawn, recent perls would not compile | |
1917 | and run well. Perl 5.20 would work, but had many bugs which have now been | |
1918 | fixed. Many CPAN modules that ship with Perl still fail tests, including | |
1919 | Pod::Simple. However the version of Pod::Simple currently on CPAN should work; | |
1920 | it was fixed too late to include in Perl 5.22. Work is under way to fix many | |
1921 | of the still-broken CPAN modules, which likely will be installed on CPAN when | |
1922 | completed, so that you may not have to wait until Perl 5.24 to get a working | |
1923 | version. | |
1924 | ||
1925 | =back | |
1926 | ||
1927 | =head2 Discontinued Platforms | |
1928 | ||
1929 | =over 4 | |
1930 | ||
1931 | =item NeXTSTEP/OPENSTEP | |
1932 | ||
f1c9eac6 DM |
1933 | NeXTSTEP was a proprietary operating system bundled with NeXT's |
1934 | workstations in the early to mid 90s; OPENSTEP was an API specification | |
1935 | that provided a NeXTSTEP-like environment on a non-NeXTSTEP system. Both | |
1936 | are now long dead, so support for building Perl on them has been removed. | |
eabfc7bc RS |
1937 | |
1938 | =back | |
1939 | ||
1940 | =head2 Platform-Specific Notes | |
1941 | ||
1942 | =over 4 | |
1943 | ||
1944 | =item EBCDIC | |
1945 | ||
1946 | Special handling is required on EBCDIC platforms to get C<qr/[i-j]/> to | |
1947 | match only C<"i"> and C<"j">, since there are 7 characters between the | |
1948 | code points for C<"i"> and C<"j">. This special handling had only been | |
1949 | invoked when both ends of the range are literals. Now it is also | |
1950 | invoked if any of the C<\N{...}> forms for specifying a character by | |
1951 | name or Unicode code point is used instead of a literal. See | |
1952 | L<perlrecharclass/Character Ranges>. | |
1953 | ||
1954 | =item HP-UX | |
1955 | ||
1956 | The archname now distinguishes use64bitint from use64bitall. | |
1957 | ||
1958 | =item Android | |
1959 | ||
1960 | Build support has been improved for cross-compiling in general and for | |
1961 | Android in particular. | |
1962 | ||
1963 | =item VMS | |
1964 | ||
1965 | =over 4 | |
1966 | ||
1967 | =item * | |
1968 | ||
1969 | When spawning a subprocess without waiting, the return value is now | |
1970 | the correct PID. | |
1971 | ||
1972 | =item * | |
1973 | ||
1974 | Fix a prototype so linking doesn't fail under the VMS C++ compiler. | |
1975 | ||
1976 | =item * | |
1977 | ||
1978 | C<finite>, C<finitel>, and C<isfinite> detection has been added to | |
1979 | C<configure.com>, environment handling has had some minor changes, and | |
1980 | a fix for legacy feature checking status. | |
1981 | ||
1982 | =back | |
1983 | ||
1984 | =item Win32 | |
1985 | ||
1986 | =over 4 | |
1987 | ||
1988 | =item * | |
1989 | ||
1990 | F<miniperl.exe> is now built with C<-fno-strict-aliasing>, allowing 64-bit | |
1991 | builds to complete on GCC 4.8. | |
1992 | L<[perl #123976]|https://rt.perl.org/Ticket/Display.html?id=123976> | |
1993 | ||
1994 | =item * | |
1995 | ||
17fcdc49 TC |
1996 | C<nmake minitest> now works on Win32. Due to dependency issues you |
1997 | need to build C<nmake test-prep> first, and a small number of the | |
1998 | tests fail. | |
1999 | L<[perl #123394]|https://rt.perl.org/Ticket/Display.html?id=123394> | |
2000 | ||
2001 | =item * | |
2002 | ||
eabfc7bc RS |
2003 | Perl can now be built in C++ mode on Windows by setting the makefile macro |
2004 | C<USE_CPLUSPLUS> to the value "define". | |
2005 | ||
2006 | =item * | |
2007 | ||
d140c31c | 2008 | The list form of piped open has been implemented for Win32. Note: unlike |
00eebae1 | 2009 | C<system LIST> this does not fall back to the shell. |
18f4cc8e | 2010 | L<[perl #121159]|https://rt.perl.org/Ticket/Display.html?id=121159> |
eabfc7bc RS |
2011 | |
2012 | =item * | |
2013 | ||
eabfc7bc RS |
2014 | New C<DebugSymbols> and C<DebugFull> configuration options added to |
2015 | Windows makefiles. | |
2016 | ||
2017 | =item * | |
2018 | ||
f1c9eac6 | 2019 | Previously compiling XS modules (including CPAN ones) using Visual C++ for |
b0511669 | 2020 | Win64 resulted in around a dozen warnings per file from F<hv_func.h>. These |
f1c9eac6 | 2021 | warnings have been silenced. |
eabfc7bc RS |
2022 | |
2023 | =item * | |
2024 | ||
2025 | Support for building without PerlIO has been removed from the Windows | |
2026 | makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are | |
2027 | already not supported by F<Configure> on POSIX systems. | |
2028 | ||
2029 | =item * | |
2030 | ||
d140c31c AC |
2031 | Between 2 and 6 milliseconds and seven I/O calls have been saved per attempt |
2032 | to open a perl module for each path in C<@INC>. | |
eabfc7bc RS |
2033 | |
2034 | =item * | |
2035 | ||
2036 | Intel C builds are now always built with C99 mode on. | |
2037 | ||
2038 | =item * | |
2039 | ||
2040 | C<%I64d> is now being used instead of C<%lld> for MinGW. | |
2041 | ||
2042 | =item * | |
2043 | ||
2044 | In the experimental C<:win32> layer, a crash in C<open> was fixed. Also | |
3209f716 | 2045 | opening F</dev/null> (which works under Win32 Perl's default C<:unix> |
d140c31c | 2046 | layer) was implemented for C<:win32>. |
eabfc7bc RS |
2047 | L<[perl #122224]|https://rt.perl.org/Ticket/Display.html?id=122224> |
2048 | ||
2049 | =item * | |
2050 | ||
2051 | A new makefile option, C<USE_LONG_DOUBLE>, has been added to the Windows | |
2052 | dmake makefile for gcc builds only. Set this to "define" if you want perl to | |
2053 | use long doubles to give more accuracy and range for floating point numbers. | |
2054 | ||
2055 | =back | |
2056 | ||
2057 | =item OpenBSD | |
2058 | ||
2059 | On OpenBSD, Perl will now default to using the system C<malloc> due to the | |
2060 | security features it provides. Perl's own malloc wrapper has been in use | |
2061 | since v5.14 due to performance reasons, but the OpenBSD project believes | |
2062 | the tradeoff is worth it and would prefer that users who need the speed | |
2063 | specifically ask for it. | |
2064 | ||
2065 | L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>. | |
2066 | ||
2067 | =item Solaris | |
2068 | ||
2069 | =over 4 | |
2070 | ||
2071 | =item * | |
2072 | ||
2073 | We now look for the Sun Studio compiler in both F</opt/solstudio*> and | |
2074 | F</opt/solarisstudio*>. | |
2075 | ||
2076 | =item * | |
2077 | ||
2078 | Builds on Solaris 10 with C<-Dusedtrace> would fail early since make | |
2079 | didn't follow implied dependencies to build C<perldtrace.h>. Added an | |
2080 | explicit dependency to C<depend>. | |
2081 | L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120> | |
2082 | ||
2083 | =item * | |
2084 | ||
d140c31c AC |
2085 | C<c99> options have been cleaned up; hints look for C<solstudio> |
2086 | as well as C<SUNWspro>; and support for native C<setenv> has been added. | |
eabfc7bc RS |
2087 | |
2088 | =back | |
2089 | ||
2090 | =back | |
2091 | ||
2092 | =head1 Internal Changes | |
2093 | ||
2094 | =over 4 | |
2095 | ||
2096 | =item * | |
2097 | ||
bad0181b DM |
2098 | Experimental support has been added to allow ops in the optree to locate |
2099 | their parent, if any. This is enabled by the non-default build option | |
2100 | C<-DPERL_OP_PARENT>. It is envisaged that this will eventually become | |
b0511669 | 2101 | enabled by default, so XS code which directly accesses the C<op_sibling> |
bad0181b | 2102 | field of ops should be updated to be future-proofed. |
eabfc7bc RS |
2103 | |
2104 | On C<PERL_OP_PARENT> builds, the C<op_sibling> field has been renamed | |
bad0181b DM |
2105 | C<op_sibparent> and a new flag, C<op_moresib>, added. On the last op in a |
2106 | sibling chain, C<op_moresib> is false and C<op_sibparent> points to the | |
b0511669 | 2107 | parent (if any) rather than being C<NULL>. |
bad0181b | 2108 | |
b0511669 | 2109 | To make existing code work transparently whether using C<PERL_OP_PARENT> |
bad0181b DM |
2110 | or not, a number of new macros and functions have been added that should |
2111 | be used, rather than directly manipulating C<op_sibling>. | |
2112 | ||
2113 | For the case of just reading C<op_sibling> to determine the next sibling, | |
2114 | two new macros have been added. A simple scan through a sibling chain | |
2115 | like this: | |
2116 | ||
b0511669 | 2117 | for (; kid->op_sibling; kid = kid->op_sibling) { ... } |
bad0181b DM |
2118 | |
2119 | should now be written as: | |
2120 | ||
b0511669 | 2121 | for (; OpHAS_SIBLING(kid); kid = OpSIBLING(kid)) { ... } |
bad0181b | 2122 | |
d140c31c | 2123 | For altering optrees, a general-purpose function C<op_sibling_splice()> |
bad0181b DM |
2124 | has been added, which allows for manipulation of a chain of sibling ops. |
2125 | By analogy with the Perl function C<splice()>, it allows you to cut out | |
2126 | zero or more ops from a sibling chain and replace them with zero or more | |
2127 | new ops. It transparently handles all the updating of sibling, parent, | |
2128 | op_last pointers etc. | |
2129 | ||
2130 | If you need to manipulate ops at a lower level, then three new macros, | |
2131 | C<OpMORESIB_set>, C<OpLASTSIB_set> and C<OpMAYBESIB_set> are intended to | |
2132 | be a low-level portable way to set C<op_sibling> / C<op_sibparent> while | |
2133 | also updating C<op_moresib>. The first sets the sibling pointer to a new | |
2134 | sibling, the second makes the op the last sibling, and the third | |
2135 | conditionally does the first or second action. Note that unlike | |
2136 | C<op_sibling_splice()> these macros won't maintain consistency in the | |
2137 | parent at the same time (e.g. by updating C<op_first> and C<op_last> where | |
2138 | appropriate). | |
2139 | ||
d140c31c | 2140 | A C-level C<Perl_op_parent()> function and a Perl-level C<B::OP::parent()> |
bad0181b | 2141 | method have been added. The C function only exists under |
b0511669 | 2142 | C<PERL_OP_PARENT> builds (using it is build-time error on vanilla |
bad0181b | 2143 | perls). C<B::OP::parent()> exists always, but on a vanilla build it |
b0511669 | 2144 | always returns C<NULL>. Under C<PERL_OP_PARENT>, they return the parent |
bad0181b DM |
2145 | of the current op, if any. The variable C<$B::OP::does_parent> allows you |
2146 | to determine whether C<B> supports retrieving an op's parent. | |
2147 | ||
b0511669 | 2148 | C<PERL_OP_PARENT> was introduced in 5.21.2, but the interface was |
bad0181b DM |
2149 | changed considerably in 5.21.11. If you updated your code before the |
2150 | 5.21.11 changes, it may require further revision. The main changes after | |
2151 | 5.21.2 were: | |
eabfc7bc | 2152 | |
bad0181b | 2153 | =over 4 |
eabfc7bc RS |
2154 | |
2155 | =item * | |
2156 | ||
bad0181b DM |
2157 | The C<OP_SIBLING> and C<OP_HAS_SIBLING> macros have been renamed |
2158 | C<OpSIBLING> and C<OpHAS_SIBLING> for consistency with other | |
2159 | op-manipulating macros. | |
eabfc7bc RS |
2160 | |
2161 | =item * | |
2162 | ||
bad0181b DM |
2163 | The C<op_lastsib> field has been renamed C<op_moresib>, and its meaning |
2164 | inverted. | |
eabfc7bc RS |
2165 | |
2166 | =item * | |
2167 | ||
bad0181b DM |
2168 | The macro C<OpSIBLING_set> has been removed, and has been superseded by |
2169 | C<OpMORESIB_set> et al. | |
eabfc7bc RS |
2170 | |
2171 | =item * | |
2172 | ||
bad0181b DM |
2173 | The C<op_sibling_splice()> function now accepts a null C<parent> argument |
2174 | where the splicing doesn't affect the first or last ops in the sibling | |
2175 | chain | |
eabfc7bc RS |
2176 | |
2177 | =back | |
2178 | ||
2179 | =item * | |
2180 | ||
2181 | Macros have been created to allow XS code to better manipulate the POSIX locale | |
2182 | category C<LC_NUMERIC>. See L<perlapi/Locale-related functions and macros>. | |
2183 | ||
2184 | =item * | |
2185 | ||
2186 | The previous C<atoi> et al replacement function, C<grok_atou>, has now been | |
2187 | superseded by C<grok_atoUV>. See L<perlclib> for details. | |
2188 | ||
2189 | =item * | |
2190 | ||
b0511669 DM |
2191 | A new function, C<Perl_sv_get_backrefs()>, has been added which allows you |
2192 | retrieve the weak references, if any, which point at an SV. | |
eabfc7bc RS |
2193 | |
2194 | =item * | |
2195 | ||
b0511669 | 2196 | The C<screaminstr()> function has been removed. Although marked as |
f1c9eac6 DM |
2197 | public API, it was undocumented and had no usage in CPAN modules. Calling |
2198 | it has been fatal since 5.17.0. | |
eabfc7bc RS |
2199 | |
2200 | =item * | |
2201 | ||
b0511669 DM |
2202 | The C<newDEFSVOP()>, C<block_start()>, C<block_end()> and C<intro_my()> |
2203 | functions have been added to the API. | |
eabfc7bc RS |
2204 | |
2205 | =item * | |
2206 | ||
2207 | The internal C<convert> function in F<op.c> has been renamed | |
2208 | C<op_convert_list> and added to the API. | |
2209 | ||
2210 | =item * | |
2211 | ||
b0511669 DM |
2212 | The C<sv_magic()> function no longer forbids "ext" magic on read-only |
2213 | values. After all, perl can't know whether the custom magic will modify | |
2214 | the SV or not. | |
a75e6a3a | 2215 | L<[perl #123103]|https://rt.perl.org/Ticket/Display.html?id=123103>. |
eabfc7bc RS |
2216 | |
2217 | =item * | |
2218 | ||
d140c31c AC |
2219 | Accessing L<perlapi/CvPADLIST> on an XSUB is now forbidden. |
2220 | ||
cca58a48 DM |
2221 | The C<CvPADLIST> field has been reused for a different internal purpose |
2222 | for XSUBs. So in particular, you can no longer rely on it being NULL as a | |
2223 | test of whether a CV is an XSUB. Use C<CvISXSUB()> instead. | |
2224 | ||
eabfc7bc RS |
2225 | =item * |
2226 | ||
b0511669 | 2227 | SVs of type C<SVt_NV> are now sometimes bodiless when the build |
cca58a48 | 2228 | configuration and platform allow it: specifically, when C<< sizeof(NV) <= |
b0511669 | 2229 | sizeof(IV) >>. "Bodiless" means that the NV value is stored directly in |
cca58a48 DM |
2230 | the head of an SV, without requiring a separate body to be allocated. This |
2231 | trick has already been used for IVs since 5.9.2 (though in the case of | |
2232 | IVs, it is always used, regardless of platform and build configuration). | |
eabfc7bc RS |
2233 | |
2234 | =item * | |
2235 | ||
b0511669 | 2236 | The C<$DB::single>, C<$DB::signal> and C<$DB::trace> variables now have set- and |
d140c31c | 2237 | get-magic that stores their values as IVs, and those IVs are used when |
b0511669 | 2238 | testing their values in C<pp_dbstate()>. This prevents perl from |
f1c9eac6 | 2239 | recursing infinitely if an overloaded object is assigned to any of those |
a75e6a3a SH |
2240 | variables. |
2241 | L<[perl #122445]|https://rt.perl.org/Ticket/Display.html?id=122445>. | |
eabfc7bc RS |
2242 | |
2243 | =item * | |
2244 | ||
b0511669 | 2245 | C<Perl_tmps_grow()>, which is marked as public API but is undocumented, has |
d140c31c | 2246 | been removed from the public API. This change does not affect XS code that |
b0511669 | 2247 | uses the C<EXTEND_MORTAL> macro to pre-extend the mortal stack. |
eabfc7bc RS |
2248 | |
2249 | =item * | |
2250 | ||
b0511669 DM |
2251 | Perl's internals no longer sets or uses the C<SVs_PADMY> flag. |
2252 | C<SvPADMY()> now returns a true value for anything not marked C<PADTMP> | |
2253 | and C<SVs_PADMY> is now defined as 0. | |
eabfc7bc RS |
2254 | |
2255 | =item * | |
2256 | ||
d140c31c | 2257 | The macros C<SETsv> and C<SETsvUN> have been removed. They were no longer used |
b0511669 DM |
2258 | in the core since commit 6f1401dc2a five years ago, and have not been |
2259 | found present on CPAN. | |
eabfc7bc RS |
2260 | |
2261 | =item * | |
2262 | ||
2263 | The C<< SvFAKE >> bit (unused on HVs) got informally reserved by | |
2264 | David Mitchell for future work on vtables. | |
2265 | ||
2266 | =item * | |
2267 | ||
b0511669 | 2268 | The C<sv_catpvn_flags()> function accepts C<SV_CATBYTES> and C<SV_CATUTF8> |
50ea4745 | 2269 | flags, which specify whether the appended string is bytes or UTF-8, |
b0511669 DM |
2270 | respectively. (These flags have in fact been present since 5.16.0, but |
2271 | were formerly not regarded as part of the API.) | |
eabfc7bc RS |
2272 | |
2273 | =item * | |
2274 | ||
f1c9eac6 | 2275 | A new opcode class, C<< METHOP >>, has been introduced. It holds |
d140c31c | 2276 | information used at runtime for improve the performance |
eabfc7bc RS |
2277 | of class/object method calls. |
2278 | ||
d140c31c | 2279 | C<< OP_METHOD >> and C<< OP_METHOD_NAMED >> have changed from being |
eabfc7bc RS |
2280 | C<< UNOP/SVOP >> to being C<< METHOP >>. |
2281 | ||
2282 | =item * | |
2283 | ||
b0511669 DM |
2284 | C<cv_name()> is a new API function that can be passed a CV or GV. It |
2285 | returns an SV containing the name of the subroutine, for use in | |
2286 | diagnostics. | |
eabfc7bc | 2287 | |
b0511669 DM |
2288 | Note that after C<cv_name> was introduced in 5.21.4, it had a C<flags> |
2289 | field added in 5.21.5 which allows the caller to specify whether the name | |
2290 | should be fully qualified. See L<perlapi/cv_name>. | |
eabfc7bc | 2291 | |
eabfc7bc RS |
2292 | L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> |
2293 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> | |
2294 | ||
2295 | =item * | |
2296 | ||
b0511669 DM |
2297 | C<cv_set_call_checker_flags()> is a new API function that works like |
2298 | C<cv_set_call_checker()>, except that it allows the caller to specify | |
2299 | whether the call checker requires a full GV for reporting the subroutine's | |
2300 | name, or whether it could be passed a CV instead. Whatever value is | |
2301 | passed will be acceptable to C<cv_name()>. C<cv_set_call_checker()> | |
2302 | guarantees there will be a GV, but it may have to create one on the fly, | |
2303 | which is inefficient. | |
eabfc7bc RS |
2304 | L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> |
2305 | ||
2306 | =item * | |
2307 | ||
2308 | C<CvGV> (which is not part of the API) is now a more complex macro, which may | |
b0511669 | 2309 | call a function and reify a GV. For those cases where it has been used as a |
eabfc7bc RS |
2310 | boolean, C<CvHASGV> has been added, which will return true for CVs that |
2311 | notionally have GVs, but without reifying the GV. C<CvGV> also returns a GV | |
2312 | now for lexical subs. | |
2313 | L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> | |
2314 | ||
2315 | =item * | |
2316 | ||
d140c31c AC |
2317 | The L<perlapi/sync_locale> function has been added to the public API. |
2318 | Changing the program's locale should be avoided by XS code. Nevertheless, | |
2319 | certain non-Perl libraries called from XS need to do so, such as C<Gtk>. | |
2320 | When this happens, Perl needs to be told that the locale has | |
eabfc7bc RS |
2321 | changed. Use this function to do so, before returning to Perl. |
2322 | ||
2323 | =item * | |
2324 | ||
2325 | The defines and labels for the flags in the C<op_private> field of OPs are now | |
2326 | auto-generated from data in F<regen/op_private>. The noticeable effect of this | |
2327 | is that some of the flag output of C<Concise> might differ slightly, and the | |
3209f716 | 2328 | flag output of S<C<perl -Dx>> may differ considerably (they both use the same set |
d140c31c AC |
2329 | of labels now). Also, debugging builds now have a new assertion in |
2330 | C<op_free()> to ensure that the op doesn't have any unrecognized flags set in | |
eabfc7bc RS |
2331 | C<op_private>. |
2332 | ||
2333 | =item * | |
2334 | ||
eabfc7bc RS |
2335 | The deprecated variable C<PL_sv_objcount> has been removed. |
2336 | ||
2337 | =item * | |
2338 | ||
2339 | Perl now tries to keep the locale category C<LC_NUMERIC> set to "C" | |
2340 | except around operations that need it to be set to the program's | |
2341 | underlying locale. This protects the many XS modules that cannot cope | |
2342 | with the decimal radix character not being a dot. Prior to this | |
2343 | release, Perl initialized this category to "C", but a call to | |
2344 | C<POSIX::setlocale()> would change it. Now such a call will change the | |
2345 | underlying locale of the C<LC_NUMERIC> category for the program, but the | |
ce93e38b KW |
2346 | locale exposed to XS code will remain "C". There are new macros |
2347 | to manipulate the LC_NUMERIC locale, including | |
2348 | C<STORE_LC_NUMERIC_SET_TO_NEEDED> and | |
2349 | C<STORE_LC_NUMERIC_FORCE_TO_UNDERLYING>. | |
2350 | See L<perlapi/Locale-related functions and macros>. | |
eabfc7bc RS |
2351 | |
2352 | =item * | |
2353 | ||
2354 | A new macro L<C<isUTF8_CHAR>|perlapi/isUTF8_CHAR> has been written which | |
2355 | efficiently determines if the string given by its parameters begins | |
2356 | with a well-formed UTF-8 encoded character. | |
2357 | ||
2358 | =item * | |
2359 | ||
b0511669 | 2360 | The following private API functions had their context parameter removed: |
eabfc7bc RS |
2361 | C<Perl_cast_ulong>, C<Perl_cast_i32>, C<Perl_cast_iv>, C<Perl_cast_uv>, |
2362 | C<Perl_cv_const_sv>, C<Perl_mg_find>, C<Perl_mg_findext>, C<Perl_mg_magical>, | |
2363 | C<Perl_mini_mktime>, C<Perl_my_dirfd>, C<Perl_sv_backoff>, C<Perl_utf8_hop>. | |
2364 | ||
cca58a48 DM |
2365 | Note that the prefix-less versions of those functions that are part of the |
2366 | public API, such as C<cast_i32()>, remain unaffected. | |
eabfc7bc RS |
2367 | |
2368 | =item * | |
2369 | ||
b0511669 DM |
2370 | The C<PADNAME> and C<PADNAMELIST> types are now separate types, and no |
2371 | longer simply aliases for SV and AV. | |
a75e6a3a | 2372 | L<[perl #123223]|https://rt.perl.org/Ticket/Display.html?id=123223>. |
eabfc7bc RS |
2373 | |
2374 | =item * | |
2375 | ||
50ea4745 | 2376 | Pad names are now always UTF-8. The C<PadnameUTF8> macro always returns |
eabfc7bc RS |
2377 | true. Previously, this was effectively the case already, but any support |
2378 | for two different internal representations of pad names has now been | |
2379 | removed. | |
2380 | ||
2381 | =item * | |
2382 | ||
eabfc7bc RS |
2383 | A new op class, C<UNOP_AUX>, has been added. This is a subclass of |
2384 | C<UNOP> with an C<op_aux> field added, which points to an array of unions | |
2385 | of C<UV>, C<SV*> etc. It is intended for where an op needs to store more data | |
2386 | than a simple C<op_sv> or whatever. Currently the only op of this type is | |
2387 | C<OP_MULTIDEREF> (see below). | |
2388 | ||
2389 | =item * | |
2390 | ||
2391 | A new op has been added, C<OP_MULTIDEREF>, which performs one or more | |
2392 | nested array and hash lookups where the key is a constant or simple | |
2393 | variable. For example the expression C<$a[0]{$k}[$i]>, which previously | |
2394 | involved ten C<rv2Xv>, C<Xelem>, C<gvsv> and C<const> ops is now performed | |
2395 | by a single C<multideref> op. It can also handle C<local>, C<exists> and | |
2396 | C<delete>. A non-simple index expression, such as C<[$i+1]> is still done | |
77c2376a | 2397 | using C<aelem>/C<helem>, and single-level array lookup with a small constant |
eabfc7bc RS |
2398 | index is still done using C<aelemfast>. |
2399 | ||
2400 | =back | |
2401 | ||
2402 | =head1 Selected Bug Fixes | |
2403 | ||
2404 | =over 4 | |
2405 | ||
2406 | =item * | |
2407 | ||
33ca8d3c DM |
2408 | C<pack("D", $x)> and C<pack("F", $x)> now zero the padding on x86 long |
2409 | double builds. Under some build options on GCC 4.8 and later, they used | |
2410 | to either overwrite the zero-initialized padding, or bypass the | |
2411 | initialized buffer entirely. This caused F<op/pack.t> to fail. | |
eabfc7bc RS |
2412 | L<[perl #123971]|https://rt.perl.org/Ticket/Display.html?id=123971> |
2413 | ||
2414 | =item * | |
2415 | ||
2416 | Extending an array cloned from a parent thread could result in "Modification of | |
2417 | a read-only value attempted" errors when attempting to modify the new elements. | |
2418 | L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> | |
2419 | ||
2420 | =item * | |
2421 | ||
2422 | An assertion failure and subsequent crash with C<< *x=<y> >> has been fixed. | |
2423 | L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790> | |
2424 | ||
2425 | =item * | |
2426 | ||
33ca8d3c DM |
2427 | A possible crashing/looping bug related to compiling lexical subs has been |
2428 | fixed. | |
eabfc7bc RS |
2429 | L<[perl #124099]|https://rt.perl.org/Ticket/Display.html?id=124099> |
2430 | ||
2431 | =item * | |
2432 | ||
d140c31c AC |
2433 | UTF-8 now works correctly in function names, in unquoted HERE-document |
2434 | terminators, and in variable names used as array indexes. | |
eabfc7bc RS |
2435 | L<[perl #124113]|https://rt.perl.org/Ticket/Display.html?id=124113> |
2436 | ||
2437 | =item * | |
2438 | ||
2439 | Repeated global pattern matches in scalar context on large tainted strings were | |
2440 | exponentially slow depending on the current match position in the string. | |
2441 | L<[perl #123202]|https://rt.perl.org/Ticket/Display.html?id=123202> | |
2442 | ||
2443 | =item * | |
2444 | ||
2445 | Various crashes due to the parser getting confused by syntax errors have been | |
2446 | fixed. | |
2447 | L<[perl #123801]|https://rt.perl.org/Ticket/Display.html?id=123801> | |
2448 | L<[perl #123802]|https://rt.perl.org/Ticket/Display.html?id=123802> | |
2449 | L<[perl #123955]|https://rt.perl.org/Ticket/Display.html?id=123955> | |
2450 | L<[perl #123995]|https://rt.perl.org/Ticket/Display.html?id=123995> | |
2451 | ||
2452 | =item * | |
2453 | ||
d140c31c | 2454 | C<split> in the scope of lexical C<$_> has been fixed not to fail assertions. |
eabfc7bc RS |
2455 | L<[perl #123763]|https://rt.perl.org/Ticket/Display.html?id=123763> |
2456 | ||
2457 | =item * | |
2458 | ||
2459 | C<my $x : attr> syntax inside various list operators no longer fails | |
2460 | assertions. | |
2461 | L<[perl #123817]|https://rt.perl.org/Ticket/Display.html?id=123817> | |
2462 | ||
2463 | =item * | |
2464 | ||
4ec8e6f0 | 2465 | An C<@> sign in quotes followed by a non-ASCII digit (which is not a valid |
33ca8d3c DM |
2466 | identifier) would cause the parser to crash, instead of simply trying the |
2467 | C<@> as literal. This has been fixed. | |
eabfc7bc RS |
2468 | L<[perl #123963]|https://rt.perl.org/Ticket/Display.html?id=123963> |
2469 | ||
2470 | =item * | |
2471 | ||
2472 | C<*bar::=*foo::=*glob_with_hash> has been crashing since Perl 5.14, but no | |
2473 | longer does. | |
2474 | L<[perl #123847]|https://rt.perl.org/Ticket/Display.html?id=123847> | |
2475 | ||
2476 | =item * | |
2477 | ||
2478 | C<foreach> in scalar context was not pushing an item on to the stack, resulting | |
33ca8d3c DM |
2479 | in bugs. (S<C<print 4, scalar do { foreach(@x){} } + 1>> would print 5.) |
2480 | It has been fixed to return C<undef>. | |
eabfc7bc RS |
2481 | L<[perl #124004]|https://rt.perl.org/Ticket/Display.html?id=124004> |
2482 | ||
2483 | =item * | |
2484 | ||
eabfc7bc RS |
2485 | Several cases of data used to store environment variable contents in core C |
2486 | code being potentially overwritten before being used have been fixed. | |
2487 | L<[perl #123748]|https://rt.perl.org/Ticket/Display.html?id=123748> | |
2488 | ||
2489 | =item * | |
2490 | ||
33ca8d3c DM |
2491 | Some patterns starting with C</.*..../> matched against long strings have |
2492 | been slow since v5.8, and some of the form C</.*..../i> have been slow | |
2493 | since v5.18. They are now all fast again. | |
a75e6a3a | 2494 | L<[perl #123743]|https://rt.perl.org/Ticket/Display.html?id=123743>. |
eabfc7bc RS |
2495 | |
2496 | =item * | |
2497 | ||
2498 | The original visible value of C<$/> is now preserved when it is set to | |
2499 | an invalid value. Previously if you set C<$/> to a reference to an | |
2500 | array, for example, perl would produce a runtime error and not set | |
2501 | C<PL_rs>, but perl code that checked C<$/> would see the array | |
a75e6a3a SH |
2502 | reference. |
2503 | L<[perl #123218]|https://rt.perl.org/Ticket/Display.html?id=123218>. | |
eabfc7bc RS |
2504 | |
2505 | =item * | |
2506 | ||
2507 | In a regular expression pattern, a POSIX class, like C<[:ascii:]>, must | |
93780ae6 | 2508 | be inside a bracketed character class, like C<qr/[[:ascii:]]/>. A |
eabfc7bc RS |
2509 | warning is issued when something looking like a POSIX class is not |
2510 | inside a bracketed class. That warning wasn't getting generated when | |
2511 | the POSIX class was negated: C<[:^ascii:]>. This is now fixed. | |
2512 | ||
2513 | =item * | |
2514 | ||
3209f716 | 2515 | Perl 5.14.0 introduced a bug whereby S<C<eval { LABEL: }>> would crash. This |
a75e6a3a SH |
2516 | has been fixed. |
2517 | L<[perl #123652]|https://rt.perl.org/Ticket/Display.html?id=123652>. | |
eabfc7bc RS |
2518 | |
2519 | =item * | |
2520 | ||
2521 | Various crashes due to the parser getting confused by syntax errors have | |
a75e6a3a SH |
2522 | been fixed. |
2523 | L<[perl #123617]|https://rt.perl.org/Ticket/Display.html?id=123617>. | |
2524 | L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737>. | |
2525 | L<[perl #123753]|https://rt.perl.org/Ticket/Display.html?id=123753>. | |
2526 | L<[perl #123677]|https://rt.perl.org/Ticket/Display.html?id=123677>. | |
eabfc7bc RS |
2527 | |
2528 | =item * | |
2529 | ||
2530 | Code like C</$a[/> used to read the next line of input and treat it as | |
2531 | though it came immediately after the opening bracket. Some invalid code | |
2532 | consequently would parse and run, but some code caused crashes, so this is | |
a75e6a3a SH |
2533 | now disallowed. |
2534 | L<[perl #123712]|https://rt.perl.org/Ticket/Display.html?id=123712>. | |
eabfc7bc RS |
2535 | |
2536 | =item * | |
2537 | ||
a75e6a3a SH |
2538 | Fix argument underflow for C<pack>. |
2539 | L<[perl #123874]|https://rt.perl.org/Ticket/Display.html?id=123874>. | |
eabfc7bc RS |
2540 | |
2541 | =item * | |
2542 | ||
2543 | Fix handling of non-strict C<\x{}>. Now C<\x{}> is equivalent to C<\x{0}> | |
2544 | instead of faulting. | |
2545 | ||
2546 | =item * | |
2547 | ||
2548 | C<stat -t> is now no longer treated as stackable, just like C<-t stat>. | |
a75e6a3a | 2549 | L<[perl #123816]|https://rt.perl.org/Ticket/Display.html?id=123816>. |
eabfc7bc RS |
2550 | |
2551 | =item * | |
2552 | ||
2553 | The following no longer causes a SEGV: C<qr{x+(y(?0))*}>. | |
2554 | ||
2555 | =item * | |
2556 | ||
2557 | Fixed infinite loop in parsing backrefs in regexp patterns. | |
2558 | ||
2559 | =item * | |
2560 | ||
2561 | Several minor bug fixes in behavior of Inf and NaN, including | |
2562 | warnings when stringifying Inf-like or NaN-like strings. For example, | |
2563 | "NaNcy" doesn't numify to NaN anymore. | |
2564 | ||
2565 | =item * | |
2566 | ||
eabfc7bc RS |
2567 | A bug in regular expression patterns that could lead to segfaults and |
2568 | other crashes has been fixed. This occurred only in patterns compiled | |
d140c31c AC |
2569 | with C</i> while taking into account the current POSIX locale (which usually |
2570 | means they have to be compiled within the scope of C<S<use locale>>), | |
eabfc7bc | 2571 | and there must be a string of at least 128 consecutive bytes to match. |
a75e6a3a | 2572 | L<[perl #123539]|https://rt.perl.org/Ticket/Display.html?id=123539>. |
eabfc7bc RS |
2573 | |
2574 | =item * | |
2575 | ||
33ca8d3c DM |
2576 | C<s///g> now works on very long strings (where there are more than 2 |
2577 | billion iterations) instead of dying with 'Substitution loop'. | |
a75e6a3a SH |
2578 | L<[perl #103260]|https://rt.perl.org/Ticket/Display.html?id=103260>. |
2579 | L<[perl #123071]|https://rt.perl.org/Ticket/Display.html?id=123071>. | |
eabfc7bc RS |
2580 | |
2581 | =item * | |
2582 | ||
a75e6a3a SH |
2583 | C<gmtime> no longer crashes with not-a-number values. |
2584 | L<[perl #123495]|https://rt.perl.org/Ticket/Display.html?id=123495>. | |
eabfc7bc RS |
2585 | |
2586 | =item * | |
2587 | ||
33ca8d3c DM |
2588 | C<\()> (a reference to an empty list), and C<y///> with lexical C<$_> in |
2589 | scope, could both do a bad write past the end of the stack. They have | |
2590 | both been fixed to extend the stack first. | |
eabfc7bc RS |
2591 | |
2592 | =item * | |
2593 | ||
2594 | C<prototype()> with no arguments used to read the previous item on the | |
3209f716 KW |
2595 | stack, so S<C<print "foo", prototype()>> would print foo's prototype. |
2596 | It has been fixed to infer C<$_> instead. | |
a75e6a3a | 2597 | L<[perl #123514]|https://rt.perl.org/Ticket/Display.html?id=123514>. |
eabfc7bc RS |
2598 | |
2599 | =item * | |
2600 | ||
33ca8d3c DM |
2601 | Some cases of lexical state subs declared inside predeclared subs could |
2602 | crash, for example when evalling a string including the name of an outer | |
2603 | variable, but no longer do. | |
eabfc7bc RS |
2604 | |
2605 | =item * | |
2606 | ||
2607 | Some cases of nested lexical state subs inside anonymous subs could cause | |
d140c31c | 2608 | 'Bizarre copy' errors or possibly even crashes. |
eabfc7bc RS |
2609 | |
2610 | =item * | |
2611 | ||
2612 | When trying to emit warnings, perl's default debugger (F<perl5db.pl>) was | |
2613 | sometimes giving 'Undefined subroutine &DB::db_warn called' instead. This | |
a75e6a3a SH |
2614 | bug, which started to occur in Perl 5.18, has been fixed. |
2615 | L<[perl #123553]|https://rt.perl.org/Ticket/Display.html?id=123553>. | |
eabfc7bc RS |
2616 | |
2617 | =item * | |
2618 | ||
d140c31c | 2619 | Certain syntax errors in substitutions, such as C<< s/${<>{})// >>, would |
eabfc7bc RS |
2620 | crash, and had done so since Perl 5.10. (In some cases the crash did not |
2621 | start happening till 5.16.) The crash has, of course, been fixed. | |
a75e6a3a | 2622 | L<[perl #123542]|https://rt.perl.org/Ticket/Display.html?id=123542>. |
eabfc7bc RS |
2623 | |
2624 | =item * | |
2625 | ||
33ca8d3c | 2626 | Fix a couple of string grow size calculation overflows; in particular, |
3209f716 | 2627 | a repeat expression like S<C<33 x ~3>> could cause a large buffer |
eabfc7bc | 2628 | overflow since the new output buffer size was not correctly handled by |
3209f716 | 2629 | C<SvGROW()>. An expression like this now properly produces a memory wrap |
a75e6a3a SH |
2630 | panic. |
2631 | L<[perl #123554]|https://rt.perl.org/Ticket/Display.html?id=123554>. | |
eabfc7bc RS |
2632 | |
2633 | =item * | |
2634 | ||
2635 | C<< formline("@...", "a"); >> would crash. The C<FF_CHECKNL> case in | |
2636 | pp_formline() didn't set the pointer used to mark the chop position, | |
2637 | which led to the C<FF_MORE> case crashing with a segmentation fault. | |
a75e6a3a SH |
2638 | This has been fixed. |
2639 | L<[perl #123538]|https://rt.perl.org/Ticket/Display.html?id=123538>. | |
eabfc7bc RS |
2640 | |
2641 | =item * | |
2642 | ||
2643 | A possible buffer overrun and crash when parsing a literal pattern during | |
a75e6a3a SH |
2644 | regular expression compilation has been fixed. |
2645 | L<[perl #123604]|https://rt.perl.org/Ticket/Display.html?id=123604>. | |
eabfc7bc RS |
2646 | |
2647 | =item * | |
2648 | ||
4ec8e6f0 | 2649 | C<fchmod()> and C<futimes()> now set C<$!> when they fail due to being |
a75e6a3a SH |
2650 | passed a closed file handle. |
2651 | L<[perl #122703]|https://rt.perl.org/Ticket/Display.html?id=122703>. | |
eabfc7bc RS |
2652 | |
2653 | =item * | |
2654 | ||
33ca8d3c DM |
2655 | C<op_free()> and C<scalarvoid()> no longer crash due to a stack overflow |
2656 | when freeing a deeply recursive op tree. | |
a75e6a3a | 2657 | L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>. |
eabfc7bc RS |
2658 | |
2659 | =item * | |
2660 | ||
50ea4745 | 2661 | In Perl 5.20.0, C<$^N> accidentally had the internal UTF-8 flag turned off |
eabfc7bc | 2662 | if accessed from a code block within a regular expression, effectively |
50ea4745 | 2663 | UTF-8-encoding the value. This has been fixed. |
a75e6a3a | 2664 | L<[perl #123135]|https://rt.perl.org/Ticket/Display.html?id=123135>. |
eabfc7bc RS |
2665 | |
2666 | =item * | |
2667 | ||
2668 | A failed C<semctl> call no longer overwrites existing items on the stack, | |
33ca8d3c DM |
2669 | which means that C<(semctl(-1,0,0,0))[0]> no longer gives an |
2670 | "uninitialized" warning. | |
eabfc7bc RS |
2671 | |
2672 | =item * | |
2673 | ||
2674 | C<else{foo()}> with no space before C<foo> is now better at assigning the | |
a75e6a3a SH |
2675 | right line number to that statement. |
2676 | L<[perl #122695]|https://rt.perl.org/Ticket/Display.html?id=122695>. | |
eabfc7bc RS |
2677 | |
2678 | =item * | |
2679 | ||
d140c31c | 2680 | Sometimes the assignment in C<@array = split> gets optimised so that C<split> |
eabfc7bc RS |
2681 | itself writes directly to the array. This caused a bug, preventing this |
2682 | assignment from being used in lvalue context. So | |
2683 | C<(@a=split//,"foo")=bar()> was an error. (This bug probably goes back to | |
33ca8d3c | 2684 | Perl 3, when the optimisation was added.) It has now been fixed. |
a75e6a3a | 2685 | L<[perl #123057]|https://rt.perl.org/Ticket/Display.html?id=123057>. |
eabfc7bc RS |
2686 | |
2687 | =item * | |
2688 | ||
33ca8d3c DM |
2689 | When an argument list fails the checks specified by a subroutine |
2690 | signature (which is still an experimental feature), the resulting error | |
2691 | messages now give the file and line number of the caller, not of the | |
2692 | called subroutine. | |
a75e6a3a | 2693 | L<[perl #121374]|https://rt.perl.org/Ticket/Display.html?id=121374>. |
eabfc7bc RS |
2694 | |
2695 | =item * | |
2696 | ||
33ca8d3c | 2697 | The flip-flop operators (C<..> and C<...> in scalar context) used to maintain |
eabfc7bc RS |
2698 | a separate state for each recursion level (the number of times the |
2699 | enclosing sub was called recursively), contrary to the documentation. Now | |
a75e6a3a SH |
2700 | each closure has one internal state for each flip-flop. |
2701 | L<[perl #122829]|https://rt.perl.org/Ticket/Display.html?id=122829>. | |
eabfc7bc RS |
2702 | |
2703 | =item * | |
2704 | ||
33ca8d3c DM |
2705 | The flip-flop operator (C<..> in scalar context) would return the same |
2706 | scalar each time, unless the containing subroutine was called recursively. | |
2707 | Now it always returns a new scalar. | |
2708 | L<[perl #122829]|https://rt.perl.org/Ticket/Display.html?id=122829>. | |
2709 | ||
2710 | =item * | |
2711 | ||
eabfc7bc RS |
2712 | C<use>, C<no>, statement labels, special blocks (C<BEGIN>) and pod are now |
2713 | permitted as the first thing in a C<map> or C<grep> block, the block after | |
2714 | C<print> or C<say> (or other functions) returning a handle, and within | |
a75e6a3a SH |
2715 | C<${...}>, C<@{...}>, etc. |
2716 | L<[perl #122782]|https://rt.perl.org/Ticket/Display.html?id=122782>. | |
eabfc7bc RS |
2717 | |
2718 | =item * | |
2719 | ||
2720 | The repetition operator C<x> now propagates lvalue context to its left-hand | |
2721 | argument when used in contexts like C<foreach>. That allows | |
4ec8e6f0 | 2722 | S<C<for(($#that_array)x2) { ... }>> to work as expected if the loop modifies |
eabfc7bc RS |
2723 | $_. |
2724 | ||
2725 | =item * | |
2726 | ||
2727 | C<(...) x ...> in scalar context used to corrupt the stack if one operand | |
d140c31c | 2728 | was an object with "x" overloading, causing erratic behaviour. |
a75e6a3a | 2729 | L<[perl #121827]|https://rt.perl.org/Ticket/Display.html?id=121827>. |
eabfc7bc RS |
2730 | |
2731 | =item * | |
2732 | ||
33ca8d3c DM |
2733 | Assignment to a lexical scalar is often optimised away; for example in |
2734 | C<my $x; $x = $y + $z>, the assign operator is optimised away and the add | |
2735 | operator writes its result directly to C<$x>. Various bugs related to | |
2736 | this optimisation have been fixed. Certain operators on the right-hand | |
2737 | side would sometimes fail to assign the value at all or assign the wrong | |
2738 | value, or would call STORE twice or not at all on tied variables. The | |
2739 | operators affected were C<$foo++>, C<$foo-->, and C<-$foo> under C<use | |
2740 | integer>, C<chomp>, C<chr> and C<setpgrp>. | |
eabfc7bc RS |
2741 | |
2742 | =item * | |
2743 | ||
2744 | List assignments were sometimes buggy if the same scalar ended up on both | |
d140c31c | 2745 | sides of the assignment due to use of C<tied>, C<values> or C<each>. The |
eabfc7bc RS |
2746 | result would be the wrong value getting assigned. |
2747 | ||
2748 | =item * | |
2749 | ||
2750 | C<setpgrp($nonzero)> (with one argument) was accidentally changed in 5.16 | |
2751 | to mean C<setpgrp(0)>. This has been fixed. | |
2752 | ||
2753 | =item * | |
2754 | ||
2755 | C<__SUB__> could return the wrong value or even corrupt memory under the | |
4ec8e6f0 | 2756 | debugger (the C<-d> switch) and in subs containing C<eval $string>. |
eabfc7bc RS |
2757 | |
2758 | =item * | |
2759 | ||
4ec8e6f0 | 2760 | When S<C<sub () { $var }>> becomes inlinable, it now returns a different |
eabfc7bc RS |
2761 | scalar each time, just as a non-inlinable sub would, though Perl still |
2762 | optimises the copy away in cases where it would make no observable | |
2763 | difference. | |
2764 | ||
2765 | =item * | |
2766 | ||
4ec8e6f0 | 2767 | S<C<my sub f () { $var }>> and S<C<sub () : attr { $var }>> are no longer |
eabfc7bc RS |
2768 | eligible for inlining. The former would crash; the latter would just |
2769 | throw the attributes away. An exception is made for the little-known | |
2770 | ":method" attribute, which does nothing much. | |
2771 | ||
2772 | =item * | |
2773 | ||
2774 | Inlining of subs with an empty prototype is now more consistent than | |
d140c31c AC |
2775 | before. Previously, a sub with multiple statements, of which all but the last |
2776 | were optimised away, would be inlinable only if it were an anonymous sub | |
eabfc7bc RS |
2777 | containing a string C<eval> or C<state> declaration or closing over an |
2778 | outer lexical variable (or any anonymous sub under the debugger). Now any | |
2779 | sub that gets folded to a single constant after statements have been | |
2780 | optimised away is eligible for inlining. This applies to things like C<sub | |
2781 | () { jabber() if DEBUG; 42 }>. | |
2782 | ||
2783 | Some subroutines with an explicit C<return> were being made inlinable, | |
2784 | contrary to the documentation, Now C<return> always prevents inlining. | |
2785 | ||
2786 | =item * | |
2787 | ||
2788 | On some systems, such as VMS, C<crypt> can return a non-ASCII string. If a | |
50ea4745 DIM |
2789 | scalar assigned to had contained a UTF-8 string previously, then C<crypt> |
2790 | would not turn off the UTF-8 flag, thus corrupting the return value. This | |
3209f716 | 2791 | would happen with S<C<$lexical = crypt ...>>. |
eabfc7bc RS |
2792 | |
2793 | =item * | |
2794 | ||
2795 | C<crypt> no longer calls C<FETCH> twice on a tied first argument. | |
2796 | ||
2797 | =item * | |
2798 | ||
2799 | An unterminated here-doc on the last line of a quote-like operator | |
2800 | (C<qq[${ <<END }]>, C</(?{ <<END })/>) no longer causes a double free. It | |
2801 | started doing so in 5.18. | |
2802 | ||
2803 | =item * | |
2804 | ||
4ec8e6f0 | 2805 | C<index()> and C<rindex()> no longer crash when used on strings over 2GB in |
eabfc7bc RS |
2806 | size. |
2807 | L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>. | |
2808 | ||
2809 | =item * | |
2810 | ||
2811 | A small previously intentional memory leak in PERL_SYS_INIT/PERL_SYS_INIT3 on | |
2812 | Win32 builds was fixed. This might affect embedders who repeatedly create and | |
2813 | destroy perl engines within the same process. | |
2814 | ||
2815 | =item * | |
2816 | ||
2817 | C<POSIX::localeconv()> now returns the data for the program's underlying | |
2818 | locale even when called from outside the scope of S<C<use locale>>. | |
2819 | ||
2820 | =item * | |
2821 | ||
2822 | C<POSIX::localeconv()> now works properly on platforms which don't have | |
2823 | C<LC_NUMERIC> and/or C<LC_MONETARY>, or for which Perl has been compiled | |
2824 | to disregard either or both of these locale categories. In such | |
2825 | circumstances, there are now no entries for the corresponding values in | |
2826 | the hash returned by C<localeconv()>. | |
2827 | ||
2828 | =item * | |
2829 | ||
2830 | C<POSIX::localeconv()> now marks appropriately the values it returns as | |
6a3ea89b | 2831 | UTF-8 or not. Previously they were always returned as bytes, even if |
eabfc7bc RS |
2832 | they were supposed to be encoded as UTF-8. |
2833 | ||
2834 | =item * | |
2835 | ||
2836 | On Microsoft Windows, within the scope of C<S<use locale>>, the following | |
2837 | POSIX character classes gave results for many locales that did not | |
2838 | conform to the POSIX standard: | |
2839 | C<[[:alnum:]]>, | |
2840 | C<[[:alpha:]]>, | |
2841 | C<[[:blank:]]>, | |
2842 | C<[[:digit:]]>, | |
2843 | C<[[:graph:]]>, | |
2844 | C<[[:lower:]]>, | |
2845 | C<[[:print:]]>, | |
2846 | C<[[:punct:]]>, | |
2847 | C<[[:upper:]]>, | |
2848 | C<[[:word:]]>, | |
2849 | and | |
2850 | C<[[:xdigit:]]>. | |
f1c9eac6 | 2851 | This was because the underlying Microsoft implementation does not |
eabfc7bc RS |
2852 | follow the standard. Perl now takes special precautions to correct for |
2853 | this. | |
2854 | ||
2855 | =item * | |
2856 | ||
2857 | Many issues have been detected by L<Coverity|http://www.coverity.com/> and | |
2858 | fixed. | |
2859 | ||
2860 | =item * | |
2861 | ||
d140c31c | 2862 | C<system()> and friends should now work properly on more Android builds. |
eabfc7bc | 2863 | |
4ec8e6f0 | 2864 | Due to an oversight, the value specified through C<-Dtargetsh> to F<Configure> |
eabfc7bc | 2865 | would end up being ignored by some of the build process. This caused perls |
4ec8e6f0 | 2866 | cross-compiled for Android to end up with defective versions of C<system()>, |
d140c31c | 2867 | C<exec()> and backticks: the commands would end up looking for C</bin/sh> |
eabfc7bc RS |
2868 | instead of C</system/bin/sh>, and so would fail for the vast majority |
2869 | of devices, leaving C<$!> as C<ENOENT>. | |
2870 | ||
2871 | =item * | |
2872 | ||
2873 | C<qr(...\(...\)...)>, | |
2874 | C<qr[...\[...\]...]>, | |
2875 | and | |
2876 | C<qr{...\{...\}...}> | |
2877 | now work. Previously it was impossible to escape these three | |
2878 | left-characters with a backslash within a regular expression pattern | |
2879 | where otherwise they would be considered metacharacters, and the pattern | |
2880 | opening delimiter was the character, and the closing delimiter was its | |
2881 | mirror character. | |
2882 | ||
2883 | =item * | |
2884 | ||
50ea4745 | 2885 | C<< s///e >> on tainted UTF-8 strings corrupted C<< pos() >>. This bug, |
a75e6a3a SH |
2886 | introduced in 5.20, is now fixed. |
2887 | L<[perl #122148]|https://rt.perl.org/Ticket/Display.html?id=122148>. | |
eabfc7bc RS |
2888 | |
2889 | =item * | |
2890 | ||
2891 | A non-word boundary in a regular expression (C<< \B >>) did not always | |
2892 | match the end of the string; in particular C<< q{} =~ /\B/ >> did not | |
a75e6a3a SH |
2893 | match. This bug, introduced in perl 5.14, is now fixed. |
2894 | L<[perl #122090]|https://rt.perl.org/Ticket/Display.html?id=122090>. | |
eabfc7bc RS |
2895 | |
2896 | =item * | |
2897 | ||
2898 | C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed. | |
a75e6a3a | 2899 | L<[perl #122171]|https://rt.perl.org/Ticket/Display.html?id=122171>. |
eabfc7bc RS |
2900 | |
2901 | =item * | |
2902 | ||
3209f716 | 2903 | Failing to compile C<use Foo> in an C<eval> could leave a spurious |
eabfc7bc RS |
2904 | C<BEGIN> subroutine definition, which would produce a "Subroutine |
2905 | BEGIN redefined" warning on the next use of C<use>, or other C<BEGIN> | |
a75e6a3a SH |
2906 | block. |
2907 | L<[perl #122107]|https://rt.perl.org/Ticket/Display.html?id=122107>. | |
eabfc7bc RS |
2908 | |
2909 | =item * | |
2910 | ||
2911 | C<method { BLOCK } ARGS> syntax now correctly parses the arguments if they | |
a75e6a3a SH |
2912 | begin with an opening brace. |
2913 | L<[perl #46947]|https://rt.perl.org/Ticket/Display.html?id=46947>. | |
eabfc7bc RS |
2914 | |
2915 | =item * | |
2916 | ||
2917 | External libraries and Perl may have different ideas of what the locale is. | |
2918 | This is problematic when parsing version strings if the locale's numeric | |
2919 | separator has been changed. Version parsing has been patched to ensure | |
a75e6a3a SH |
2920 | it handles the locales correctly. |
2921 | L<[perl #121930]|https://rt.perl.org/Ticket/Display.html?id=121930>. | |
eabfc7bc RS |
2922 | |
2923 | =item * | |
2924 | ||
2925 | A bug has been fixed where zero-length assertions and code blocks inside of a | |
a75e6a3a SH |
2926 | regex could cause C<pos> to see an incorrect value. |
2927 | L<[perl #122460]|https://rt.perl.org/Ticket/Display.html?id=122460>. | |
eabfc7bc RS |
2928 | |
2929 | =item * | |
2930 | ||
2931 | Constant dereferencing now works correctly for typeglob constants. Previously | |
2932 | the glob was stringified and its name looked up. Now the glob itself is used. | |
2933 | L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> | |
2934 | ||
2935 | =item * | |
2936 | ||
d140c31c | 2937 | When parsing a sigil (C<$> C<@> C<%> C<&)> followed by braces, |
4ec8e6f0 | 2938 | the parser no |
eabfc7bc RS |
2939 | longer tries to guess whether it is a block or a hash constructor (causing a |
2940 | syntax error when it guesses the latter), since it can only be a block. | |
2941 | ||
2942 | =item * | |
2943 | ||
4ec8e6f0 | 2944 | S<C<undef $reference>> now frees the referent immediately, instead of hanging on |
eabfc7bc RS |
2945 | to it until the next statement. |
2946 | L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556> | |
2947 | ||
2948 | =item * | |
2949 | ||
2950 | Various cases where the name of a sub is used (autoload, overloading, error | |
2951 | messages) used to crash for lexical subs, but have been fixed. | |
2952 | ||
2953 | =item * | |
2954 | ||
2955 | Bareword lookup now tries to avoid vivifying packages if it turns out the | |
2956 | bareword is not going to be a subroutine name. | |
2957 | ||
2958 | =item * | |
2959 | ||
2960 | Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer deletes | |
2961 | any subroutine named C<__ANON__> in the current package. Not only was | |
2962 | C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug goes | |
2963 | back to Perl 5.8.0. | |
2964 | ||
2965 | =item * | |
2966 | ||
2967 | Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out constants | |
2968 | of the same name declared by C<use constant>. This bug was introduced in Perl | |
2969 | 5.10.0. | |
2970 | ||
2971 | =item * | |
2972 | ||
33ca8d3c DM |
2973 | C<qr/[\N{named sequence}]/> now works properly in many instances. |
2974 | ||
2975 | Some names | |
eabfc7bc RS |
2976 | known to C<\N{...}> refer to a sequence of multiple characters, instead of the |
2977 | usual single character. Bracketed character classes generally only match | |
2978 | single characters, but now special handling has been added so that they can | |
2979 | match named sequences, but not if the class is inverted or the sequence is | |
2980 | specified as the beginning or end of a range. In these cases, the only | |
2981 | behavior change from before is a slight rewording of the fatal error message | |
2982 | given when this class is part of a C<?[...])> construct. When the C<[...]> | |
2983 | stands alone, the same non-fatal warning as before is raised, and only the | |
2984 | first character in the sequence is used, again just as before. | |
2985 | ||
2986 | =item * | |
2987 | ||
2988 | Tainted constants evaluated at compile time no longer cause unrelated | |
2989 | statements to become tainted. | |
2990 | L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669> | |
2991 | ||
2992 | =item * | |
2993 | ||
33ca8d3c DM |
2994 | S<C<open $$fh, ...>>, which vivifies a handle with a name like |
2995 | C<"main::_GEN_0">, was not giving the handle the right reference count, so | |
2996 | a double free could happen. | |
eabfc7bc RS |
2997 | |
2998 | =item * | |
2999 | ||
3000 | When deciding that a bareword was a method name, the parser would get confused | |
4ec8e6f0 KW |
3001 | if an C<our> sub with the same name existed, and look up the method in the |
3002 | package of the C<our> sub, instead of the package of the invocant. | |
eabfc7bc RS |
3003 | |
3004 | =item * | |
3005 | ||
3006 | The parser no longer gets confused by C<\U=> within a double-quoted string. It | |
3007 | used to produce a syntax error, but now compiles it correctly. | |
3008 | L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368> | |
3009 | ||
3010 | =item * | |
3011 | ||
3012 | It has always been the intention for the C<-B> and C<-T> file test operators to | |
3013 | treat UTF-8 encoded files as text. (L<perlfunc|perlfunc/-X FILEHANDLE> has | |
3014 | been updated to say this.) Previously, it was possible for some files to be | |
3015 | considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The | |
3016 | operators now work on EBCDIC platforms as well. | |
3017 | ||
3018 | =item * | |
3019 | ||
3020 | Under some conditions warning messages raised during regular expression pattern | |
3021 | compilation were being output more than once. This has now been fixed. | |
3022 | ||
3023 | =item * | |
3024 | ||
d140c31c AC |
3025 | Perl 5.20.0 introduced a regression in which a UTF-8 encoded regular |
3026 | expression pattern that contains a single ASCII lowercase letter did not | |
3027 | match its uppercase counterpart. That has been fixed in both 5.20.1 and | |
3028 | 5.22.0. | |
eabfc7bc RS |
3029 | L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655> |
3030 | ||
3031 | =item * | |
3032 | ||
33ca8d3c DM |
3033 | Constant folding could incorrectly suppress warnings if lexical warnings |
3034 | (C<use warnings> or C<no warnings>) were not in effect and C<$^W> were | |
3035 | false at compile time and true at run time. | |
eabfc7bc RS |
3036 | |
3037 | =item * | |
3038 | ||
50ea4745 | 3039 | Loading UTF-8 tables during a regular expression match could cause assertion |
eabfc7bc RS |
3040 | failures under debugging builds if the previous match used the very same |
3041 | regular expression. | |
3042 | L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747> | |
3043 | ||
3044 | =item * | |
3045 | ||
3046 | Thread cloning used to work incorrectly for lexical subs, possibly causing | |
3047 | crashes or double frees on exit. | |
3048 | ||
3049 | =item * | |
3050 | ||
3051 | Since Perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining an | |
3052 | anonymous subroutine could corrupt things internally, resulting in | |
3053 | L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data. This has been | |
3054 | fixed. | |
3055 | ||
3056 | =item * | |
3057 | ||
33ca8d3c DM |
3058 | S<C<(caller $n)[3]>> now reports names of lexical subs, instead of |
3059 | treating them as C<"(unknown)">. | |
eabfc7bc RS |
3060 | |
3061 | =item * | |
3062 | ||
d140c31c AC |
3063 | C<sort subname LIST> now supports using a lexical sub as the comparison |
3064 | routine. | |
eabfc7bc RS |
3065 | |
3066 | =item * | |
3067 | ||
3209f716 | 3068 | Aliasing (e.g., via S<C<*x = *y>>) could confuse list assignments that mention the |
eabfc7bc RS |
3069 | two names for the same variable on either side, causing wrong values to be |
3070 | assigned. | |
3071 | L<[perl #15667]|https://rt.perl.org/Ticket/Display.html?id=15667> | |
3072 | ||
3073 | =item * | |
3074 | ||
3075 | Long here-doc terminators could cause a bad read on short lines of input. This | |
3076 | has been fixed. It is doubtful that any crash could have occurred. This bug | |
3077 | goes back to when here-docs were introduced in Perl 3.000 twenty-five years | |
3078 | ago. | |
3079 | ||
3080 | =item * | |
3081 | ||
3209f716 KW |
3082 | An optimization in C<split> to treat S<C<split /^/>> like S<C<split /^/m>> had the |
3083 | unfortunate side-effect of also treating S<C<split /\A/>> like S<C<split /^/m>>, | |
3084 | which it should not. This has been fixed. (Note, however, that S<C<split /^x/>> | |
3085 | does not behave like S<C<split /^x/m>>, which is also considered to be a bug and | |
d140c31c | 3086 | will be fixed in a future version.) |
eabfc7bc RS |
3087 | L<[perl #122761]|https://rt.perl.org/Ticket/Display.html?id=122761> |
3088 | ||
3089 | =item * | |
3090 | ||
4ec8e6f0 | 3091 | The little-known S<C<my Class $var>> syntax (see L<fields> and L<attributes>) |
eabfc7bc RS |
3092 | could get confused in the scope of C<use utf8> if C<Class> were a constant |
3093 | whose value contained Latin-1 characters. | |
3094 | ||
3095 | =item * | |
3096 | ||
3097 | Locking and unlocking values via L<Hash::Util> or C<Internals::SvREADONLY> | |
33ca8d3c | 3098 | no longer has any effect on values that were read-only to begin with. |
eabfc7bc RS |
3099 | Previously, unlocking such values could result in crashes, hangs or |
3100 | other erratic behaviour. | |
3101 | ||
3102 | =item * | |
3103 | ||
eabfc7bc RS |
3104 | Some unterminated C<(?(...)...)> constructs in regular expressions would |
3105 | either crash or give erroneous error messages. C</(?(1)/> is one such | |
3106 | example. | |
3107 | ||
3108 | =item * | |
3109 | ||
4ec8e6f0 | 3110 | S<C<pack "w", $tied>> no longer calls FETCH twice. |
eabfc7bc RS |
3111 | |
3112 | =item * | |
3113 | ||
4ec8e6f0 KW |
3114 | List assignments like S<C<($x, $z) = (1, $y)>> now work correctly if C<$x> and |
3115 | C<$y> have been aliased by C<foreach>. | |
eabfc7bc RS |
3116 | |
3117 | =item * | |
3118 | ||
3119 | Some patterns including code blocks with syntax errors, such as | |
3209f716 | 3120 | S<C</ (?{(^{})/>>, would hang or fail assertions on debugging builds. Now |
eabfc7bc RS |
3121 | they produce errors. |
3122 | ||
3123 | =item * | |
3124 | ||
3125 | An assertion failure when parsing C<sort> with debugging enabled has been | |
a75e6a3a SH |
3126 | fixed. |
3127 | L<[perl #122771]|https://rt.perl.org/Ticket/Display.html?id=122771>. | |
eabfc7bc RS |
3128 | |
3129 | =item * | |
3130 | ||
4ec8e6f0 | 3131 | S<C<*a = *b; @a = split //, $b[1]>> could do a bad read and produce junk |
eabfc7bc RS |
3132 | results. |
3133 | ||
3134 | =item * | |
3135 | ||
4ec8e6f0 | 3136 | In S<C<() = @array = split>>, the S<C<() =>> at the beginning no longer confuses |
d140c31c | 3137 | the optimizer into assuming a limit of 1. |
eabfc7bc RS |
3138 | |
3139 | =item * | |
3140 | ||
3141 | Fatal warnings no longer prevent the output of syntax errors. | |
a75e6a3a | 3142 | L<[perl #122966]|https://rt.perl.org/Ticket/Display.html?id=122966>. |
eabfc7bc RS |
3143 | |
3144 | =item * | |
3145 | ||
d140c31c | 3146 | Fixed a NaN double-to-long-double conversion error on VMS. For quiet NaNs |
eabfc7bc RS |
3147 | (and only on Itanium, not Alpha) negative infinity instead of NaN was |
3148 | produced. | |
3149 | ||
3150 | =item * | |
3151 | ||
d140c31c AC |
3152 | Fixed the issue that caused C<< make distclean >> to incorrectly leave some |
3153 | files behind. | |
a75e6a3a | 3154 | L<[perl #122820]|https://rt.perl.org/Ticket/Display.html?id=122820>. |
eabfc7bc RS |
3155 | |
3156 | =item * | |
3157 | ||
a75e6a3a SH |
3158 | AIX now sets the length in C<< getsockopt >> correctly. |
3159 | L<[perl #120835]|https://rt.perl.org/Ticket/Display.html?id=120835>. | |
3160 | L<[cpan #91183]|https://rt.cpan.org/Ticket/Display.html?id=91183>. | |
3161 | L<[cpan #85570]|https://rt.cpan.org/Ticket/Display.html?id=85570>. | |
eabfc7bc RS |
3162 | |
3163 | =item * | |
3164 | ||
6acea139 KW |
3165 | The optimization phase of a regexp compilation could run "forever" and |
3166 | exhaust all memory under certain circumstances; now fixed. | |
a75e6a3a | 3167 | L<[perl #122283]|https://rt.perl.org/Ticket/Display.html?id=122283>. |
eabfc7bc RS |
3168 | |
3169 | =item * | |
3170 | ||
33ca8d3c DM |
3171 | The test script F<< t/op/crypt.t >> now uses the SHA-256 algorithm if the |
3172 | default one is disabled, rather than giving failures. | |
a75e6a3a | 3173 | L<[perl #121591]|https://rt.perl.org/Ticket/Display.html?id=121591>. |
eabfc7bc RS |
3174 | |
3175 | =item * | |
3176 | ||
d140c31c | 3177 | Fixed an off-by-one error when setting the size of a shared array. |
a75e6a3a | 3178 | L<[perl #122950]|https://rt.perl.org/Ticket/Display.html?id=122950>. |
eabfc7bc RS |
3179 | |
3180 | =item * | |
3181 | ||
d140c31c | 3182 | Fixed a bug that could cause perl to enter an infinite loop during |
33ca8d3c DM |
3183 | compilation. In particular, for a C<while(1)> within a sublist, e.g. |
3184 | ||
3185 | sub foo { () = ($a, my $b, ($c, do { while(1) {} })) } | |
3186 | ||
3187 | The bug was introduced in 5.20.0 | |
a75e6a3a | 3188 | L<[perl #122995]|https://rt.perl.org/Ticket/Display.html?id=122995>. |
eabfc7bc RS |
3189 | |
3190 | =item * | |
3191 | ||
cca58a48 | 3192 | On Win32, if a variable was C<local>-ized in a pseudo-process that later |
d140c31c AC |
3193 | forked, restoring the original value in the child pseudo-process caused |
3194 | memory corruption and a crash in the child pseudo-process (and therefore the | |
3195 | OS process). | |
a75e6a3a | 3196 | L<[perl #40565]|https://rt.perl.org/Ticket/Display.html?id=40565>. |
eabfc7bc RS |
3197 | |
3198 | =item * | |
3199 | ||
3200 | Calling C<write> on a format with a C<^**> field could produce a panic | |
4ec8e6f0 | 3201 | in C<sv_chop()> if there were insufficient arguments or if the variable |
a75e6a3a SH |
3202 | used to fill the field was empty. |
3203 | L<[perl #123245]|https://rt.perl.org/Ticket/Display.html?id=123245>. | |
eabfc7bc RS |
3204 | |
3205 | =item * | |
3206 | ||
d140c31c AC |
3207 | Non-ASCII lexical sub names now appear without trailing junk when they |
3208 | appear in error messages. | |
eabfc7bc RS |
3209 | |
3210 | =item * | |
3211 | ||
3212 | The C<\@> subroutine prototype no longer flattens parenthesized arrays | |
3213 | (taking a reference to each element), but takes a reference to the array | |
a75e6a3a SH |
3214 | itself. |
3215 | L<[perl #47363]|https://rt.perl.org/Ticket/Display.html?id=47363>. | |
eabfc7bc RS |
3216 | |
3217 | =item * | |
3218 | ||
3219 | A block containing nothing except a C-style C<for> loop could corrupt the | |
3220 | stack, causing lists outside the block to lose elements or have elements | |
3221 | overwritten. This could happen with C<map { for(...){...} } ...> and with | |
a75e6a3a SH |
3222 | lists containing C<do { for(...){...} }>. |
3223 | L<[perl #123286]|https://rt.perl.org/Ticket/Display.html?id=123286>. | |
eabfc7bc RS |
3224 | |
3225 | =item * | |
3226 | ||
3227 | C<scalar()> now propagates lvalue context, so that | |
4ec8e6f0 | 3228 | S<C<for(scalar($#foo)) { ... }>> can modify C<$#foo> through C<$_>. |
eabfc7bc RS |
3229 | |
3230 | =item * | |
3231 | ||
3232 | C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY". | |
a75e6a3a | 3233 | L<[perl #123344]|https://rt.perl.org/Ticket/Display.html?id=123344>. |
eabfc7bc RS |
3234 | |
3235 | =item * | |
3236 | ||
4ec8e6f0 | 3237 | S<C<eval '$variable'>> in nested named subroutines would sometimes look up a |
eabfc7bc RS |
3238 | global variable even with a lexical variable in scope. |
3239 | ||
3240 | =item * | |
3241 | ||
3242 | In perl 5.20.0, C<sort CORE::fake> where 'fake' is anything other than a | |
33ca8d3c | 3243 | keyword, started chopping off the last 6 characters and treating the result |
eabfc7bc | 3244 | as a sort sub name. The previous behaviour of treating "CORE::fake" as a |
a75e6a3a SH |
3245 | sort sub name has been restored. |
3246 | L<[perl #123410]|https://rt.perl.org/Ticket/Display.html?id=123410>. | |
eabfc7bc RS |
3247 | |
3248 | =item * | |
3249 | ||
3250 | Outside of C<use utf8>, a single-character Latin-1 lexical variable is | |
4ec8e6f0 | 3251 | disallowed. The error message for it, "Can't use global C<$foo>...", was |
eabfc7bc RS |
3252 | giving garbage instead of the variable name. |
3253 | ||
3254 | =item * | |
3255 | ||
3256 | C<readline> on a nonexistent handle was causing C<${^LAST_FH}> to produce a | |
3257 | reference to an undefined scalar (or fail an assertion). Now | |
3258 | C<${^LAST_FH}> ends up undefined. | |
3259 | ||
3260 | =item * | |
3261 | ||
33ca8d3c | 3262 | C<(...) x ...> in void context now applies scalar context to the left-hand |
eabfc7bc | 3263 | argument, instead of the context the current sub was called in. |
a75e6a3a | 3264 | L<[perl #123020]|https://rt.perl.org/Ticket/Display.html?id=123020>. |
eabfc7bc RS |
3265 | |
3266 | =back | |
3267 | ||
3268 | =head1 Known Problems | |
3269 | ||
3270 | =over 4 | |
3271 | ||
3272 | =item * | |
3273 | ||
65039e73 RS |
3274 | C<pack>-ing a NaN on a perl compiled with Visual C 6 does not behave properly, |
3275 | leading to a test failure in F<t/op/infnan.t>. | |
3276 | L<[perl 125203]|https://rt.perl.org/Ticket/Display.html?id=125203> | |
3277 | ||
3278 | =item * | |
3279 | ||
eabfc7bc RS |
3280 | A goal is for Perl to be able to be recompiled to work reasonably well on any |
3281 | Unicode version. In Perl 5.22, though, the earliest such version is Unicode | |
3282 | 5.1 (current is 7.0). | |
3283 | ||
3284 | =item * | |
3285 | ||
3286 | EBCDIC platforms | |
3287 | ||
3288 | =over 4 | |
3289 | ||
3290 | =item * | |
3291 | ||
ce93e38b KW |
3292 | The C<cmp> (and hence C<sort>) operators do not necessarily give the |
3293 | correct results when both operands are UTF-EBCDIC encoded strings and | |
3294 | there is a mixture of ASCII and/or control characters, along with other | |
3295 | characters. | |
3296 | ||
3297 | =item * | |
3298 | ||
3299 | Ranges containing C<\N{...}> in the C<tr///> (and C<y///>) | |
3300 | transliteration operators are treated differently than the equivalent | |
d140c31c | 3301 | ranges in regular expression patterns. They should, but don't, cause |
ce93e38b KW |
3302 | the values in the ranges to all be treated as Unicode code points, and |
3303 | not native ones. (L<perlre/Version 8 Regular Expressions> gives | |
3304 | details as to how it should work.) | |
3305 | ||
3306 | =item * | |
3307 | ||
eabfc7bc RS |
3308 | Encode and encoding are mostly broken. |
3309 | ||
3310 | =item * | |
3311 | ||
0590bd99 | 3312 | Many CPAN modules that are shipped with core show failing tests. |
eabfc7bc RS |
3313 | |
3314 | =item * | |
3315 | ||
3316 | C<pack>/C<unpack> with C<"U0"> format may not work properly. | |
3317 | ||
3318 | =back | |
3319 | ||
3320 | =item * | |
3321 | ||
3322 | The following modules are known to have test failures with this version of | |
3323 | Perl. Patches have been submitted, so there will hopefully be new releases | |
3324 | soon: | |
3325 | ||
3326 | =over | |
3327 | ||
3328 | =item * | |
3329 | ||
3330 | L<B::Generate> version 1.50 | |
3331 | ||
3332 | =item * | |
3333 | ||
3334 | L<B::Utils> version 0.25 | |
3335 | ||
3336 | =item * | |
3337 | ||
3338 | L<Dancer> version 1.3130 | |
3339 | ||
3340 | =item * | |
3341 | ||
3342 | L<Data::Alias> version 1.18 | |
3343 | ||
3344 | =item * | |
3345 | ||
3346 | L<Data::Util> version 0.63 | |
3347 | ||
3348 | =item * | |
3349 | ||
ba520a57 RS |
3350 | L<Devel::Spy> version 0.07 |
3351 | ||
3352 | =item * | |
3353 | ||
2621aeba RS |
3354 | L<invoker> version 0.34 |
3355 | ||
3356 | =item * | |
3357 | ||
eabfc7bc RS |
3358 | L<Lexical::Var> version 0.009 |
3359 | ||
3360 | =item * | |
3361 | ||
3362 | L<Mason> version 2.22 | |
3363 | ||
3364 | =item * | |
3365 | ||
6be597e7 RS |
3366 | L<NgxQueue> version 0.02 |
3367 | ||
3368 | =item * | |
3369 | ||
eabfc7bc RS |
3370 | L<Padre> version 1.00 |
3371 | ||
3372 | =item * | |
3373 | ||
3374 | L<Parse::Keyword> 0.08 | |
3375 | ||
3376 | =back | |
3377 | ||
3378 | =back | |
2a7a05b4 | 3379 | |
30aa8e3f AC |
3380 | =head1 Obituary |
3381 | ||
3382 | Brian McCauley died on May 8, 2015. He was a frequent poster to Usenet, Perl | |
3383 | Monks, and other Perl forums, and made several CPAN contributions under the | |
3384 | nick NOBULL, including to the Perl FAQ. He attended almost every | |
3385 | YAPC::Europe, and indeed, helped organise YAPC::Europe 2006 and the QA | |
3386 | Hackathon 2009. His wit and his delight in intricate systems were | |
3387 | particularly apparent in his love of board games; many Perl mongers will | |
3388 | have fond memories of playing Fluxx and other games with Brian. He will be | |
3389 | missed. | |
3390 | ||
7f9fef93 | 3391 | =head1 Acknowledgements |
2a7a05b4 | 3392 | |
2cf7809b RS |
3393 | Perl 5.22.0 represents approximately 12 months of development since Perl 5.20.0 |
3394 | and contains approximately 590,000 lines of changes across 2,400 files from 94 | |
3395 | authors. | |
3396 | ||
3397 | Excluding auto-generated files, documentation and release tools, there were | |
3398 | approximately 370,000 lines of changes to 1,500 .pm, .t, .c and .h files. | |
3399 | ||
3400 | Perl continues to flourish into its third decade thanks to a vibrant community | |
3401 | of users and developers. The following people are known to have contributed the | |
3402 | improvements that became Perl 5.22.0: | |
3403 | ||
3404 | Aaron Crane, Abhijit Menon-Sen, Abigail, Alberto Simões, Alex Solovey, Alex | |
3405 | Vandiver, Alexandr Ciornii, Alexandre (Midnite) Jousset, Andreas König, | |
3406 | Andreas Voegele, Andrew Fresh, Andy Dougherty, Anthony Heading, Aristotle | |
3407 | Pagaltzis, brian d foy, Brian Fraser, Chad Granum, Chris 'BinGOs' Williams, | |
3408 | Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, Darin McBride, Dave | |
3409 | Rolsky, David Golden, David Mitchell, David Wheeler, Dmitri Tikhonov, Doug | |
3410 | Bell, E. Choroba, Ed J, Eric Herman, Father Chrysostomos, George Greer, Glenn | |
3411 | D. Golden, Graham Knop, H.Merijn Brand, Herbert Breunung, Hugo van der Sanden, | |
3412 | James E Keenan, James McCoy, James Raspass, Jan Dubois, Jarkko Hietaniemi, | |
3413 | Jasmine Ngan, Jerry D. Hedden, Jim Cromie, John Goodyear, kafka, Karen | |
3414 | Etheridge, Karl Williamson, Kent Fredric, kmx, Lajos Veres, Leon Timmermans, | |
3415 | Lukas Mai, Mathieu Arnold, Matthew Horsfall, Max Maischein, Michael Bunk, | |
3416 | Nicholas Clark, Niels Thykier, Niko Tyni, Norman Koch, Olivier Mengué, Peter | |
3417 | John Acklam, Peter Martini, Petr Písař, Philippe Bruhat (BooK), Pierre | |
3418 | Bogossian, Rafael Garcia-Suarez, Randy Stauner, Reini Urban, Ricardo Signes, | |
3419 | Rob Hoelz, Rostislav Skudnov, Sawyer X, Shirakata Kentaro, Shlomi Fish, | |
3420 | Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steve Hay, Sullivan Beck, | |
3421 | syber, Tadeusz Sośnierz, Thomas Sibley, Todd Rinaldo, Tony Cook, Vincent Pit, | |
3422 | Vladimir Marek, Yaroslav Kuzmin, Yves Orton, Ævar Arnfjörð Bjarmason. | |
3423 | ||
3424 | The list above is almost certainly incomplete as it is automatically generated | |
3425 | from version control history. In particular, it does not include the names of | |
3426 | the (very much appreciated) contributors who reported issues to the Perl bug | |
3427 | tracker. | |
3428 | ||
3429 | Many of the changes included in this version originated in the CPAN modules | |
3430 | included in Perl's core. We're grateful to the entire CPAN community for | |
3431 | helping Perl to flourish. | |
3432 | ||
3433 | For a more complete list of all of Perl's historical contributors, please see | |
3434 | the F<AUTHORS> file in the Perl source distribution. | |
f5b73711 | 3435 | |
44691e6f AB |
3436 | =head1 Reporting Bugs |
3437 | ||
e08634c5 SH |
3438 | If you find what you think is a bug, you might check the articles recently |
3439 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
e5998677 SH |
3440 | https://rt.perl.org/ . There may also be information at |
3441 | http://www.perl.org/ , the Perl Home Page. | |
44691e6f | 3442 | |
e08634c5 SH |
3443 | If you believe you have an unreported bug, please run the L<perlbug> program |
3444 | included with your release. Be sure to trim your bug down to a tiny but | |
3445 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
3446 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
44691e6f AB |
3447 | |
3448 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
3449 | inappropriate to send to a publicly archived mailing list, then please send it |
3450 | to perl5-security-report@perl.org. This points to a closed subscription | |
3451 | unarchived mailing list, which includes all the core committers, who will be | |
3452 | able to help assess the impact of issues, figure out a resolution, and help | |
f9001595 | 3453 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
3454 | platforms on which Perl is supported. Please only use this address for |
3455 | security issues in the Perl core, not for modules independently distributed on | |
3456 | CPAN. | |
44691e6f AB |
3457 | |
3458 | =head1 SEE ALSO | |
3459 | ||
e08634c5 SH |
3460 | The F<Changes> file for an explanation of how to view exhaustive details on |
3461 | what changed. | |
44691e6f AB |
3462 | |
3463 | The F<INSTALL> file for how to build Perl. | |
3464 | ||
3465 | The F<README> file for general stuff. | |
3466 | ||
3467 | The F<Artistic> and F<Copying> files for copyright information. | |
3468 | ||
3469 | =cut |