Debian Codegraph @

upstream/fedora-44/man1/perldeprecation.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "PERLDEPRECATION 1"
61 .TH PERLDEPRECATION 1 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 perldeprecation \- list Perl deprecations
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 The purpose of this document is to document what has been deprecated
71 in Perl, and by which version the deprecated feature will disappear,
72 or, for already removed features, when it was removed.
73 .PP
74 This document will try to discuss what alternatives for the deprecated
75 features are available.
76 .PP
77 The deprecated features will be grouped by the version of Perl in
78 which they will be removed.
79 .SS "Unscheduled Deprecations"
80 .IX Subsection "Unscheduled Deprecations"
81 \fIUnicode Delimiter Will be Paired\fR
82 .IX Subsection "Unicode Delimiter Will be Paired"
83 .PP
84 Some Unicode delimiters used to be allowed as single characters, but
85 in the future will be part of a balanced pair. This deprecation category
86 is used to mark the ones that will change from being unpaired to paired.
87 .PP
88 Category: "deprecated::delimiter_will_be_paired"
89 .PP
90 \fIDot In Inc\fR
91 .IX Subsection "Dot In Inc"
92 .PP
93 The current working directory \f(CW\*(C`.\*(C'\fR used to be automatically included in
94 \&\f(CW@INC\fR, but in Perl 5.26 this was removed for security reasons. Ever
95 since then we have produced a warning when a user uses \f(CW\*(C`do EXPR\*(C'\fR and
96 \&\f(CW\*(C`EXPR\*(C'\fR does not include a path, and the file was not found in any
97 directory in \f(CW@INC\fR but \fIwas\fR located in \f(CW\*(C`.\*(C'\fR. The file will not be loaded
98 but a deprecated warning will be generated.
99 .PP
100 Category: "deprecated::dot_in_inc"
101 .PP
102 \fIUnicode Property Name\fR
103 .IX Subsection "Unicode Property Name"
104 .PP
105 Various types of Unicode property name will generate deprecated warnings
106 when used in a regex pattern. For instance surrogate characters will result
107 in deprecation warnings.
108 .PP
109 Category: "deprecated::unicode_property_name"
110 .SS "Perl 5.44"
111 .IX Subsection "Perl 5.44"
112 \fICalling a missing \fR\f(CIimport()\fR\fI or \fR\f(CIunimport()\fR\fI method with an argument\fR
113 .IX Subsection "Calling a missing import() or unimport() method with an argument"
114 .PP
115 Historically calling \f(CWimport()\fR or \f(CWunimport()\fR on any class which did
116 not define such a method would be silently ignored. Effectively Perl
117 behaved as though there was an empty method defined in the \f(CW\*(C`UNIVERSAL\*(C'\fR
118 package (even when there was no such method actually defined). As of
119 Perl version 5.39.2 calling such a method \fIwith\fR an argument will
120 trigger a warning, and in Perl version 5.44 this warning will be
121 upgraded to an error. (Calling such a method with no arguments at all
122 will always be safe.)
123 .PP
124 Category: "deprecated::missing_import_called_with_args"
125 .PP
126 \fIChanging \fR\f(CI\*(C`use VERSION\*(C'\fR\fI while another \fR\f(CI\*(C`use VERSION\*(C'\fR\fI is in scope\fR
127 .IX Subsection "Changing use VERSION while another use VERSION is in scope"
128 .PP
129 A \f(CW\*(C`use VERSION\*(C'\fR declaration has many implicit effects on the surrounding
130 scope, such as strict and feature flags, or importing builtin
131 functions. Once you have a \f(CW\*(C`use VERSION\*(C'\fR statement in scope, another
132 \&\f(CW\*(C`use VERSION\*(C'\fR statement with a different version is now deprecated since
133 Perl 5.39.8, due to the increasing complexity of swapping from one
134 prevailing version to another.
135 .PP
136 Category: "deprecated::subsequent_use_version"
137 .SS "Perl 5.42"
138 .IX Subsection "Perl 5.42"
139 \fIGoto Block Construct\fR
140 .IX Subsection "Goto Block Construct"
141 .PP
142 \&\f(CW\*(C`goto LABEL;\*(C'\fR will produce a deprecated warning when jumping into the body
143 of a loop or other block construct from outside. For instance
144 .PP
145 .Vb 5
146 \& while (should_loop($x)) {
147 \& LABEL:
148 \& do_stuff();
149 \& }
150 \& goto LABEL;
151 .Ve
152 .PP
153 will produce a warning that this behavior is deprecated. In general you should
154 just avoid doing this; the people that maintain your code will be grateful for
155 your restraint.
156 .PP
157 Category: "deprecated::goto_construct"
158 .SS "Perl 5.40"
159 .IX Subsection "Perl 5.40"
160 \fIDowngrading a \fR\f(CI\*(C`use VERSION\*(C'\fR\fI to below v5.11\fR
161 .IX Subsection "Downgrading a use VERSION to below v5.11"
162 .PP
163 Once Perl has seen a \f(CW\*(C`use VERSION\*(C'\fR declaration that requests a version
164 \&\f(CW\*(C`v5.11\*(C'\fR or above, a subsequent second declaration that requests an earlier
165 version will print a deprecation warning. For example,
166 .PP
167 .Vb 2
168 \& use v5.14;
169 \& say "We can use v5.14\*(Aqs features here";
170 \&
171 \& use v5.10; # This prints a warning
172 .Ve
173 .PP
174 This was deprecated in Perl 5.36 and is now fatal.
175 .PP
176 This is because of an intended related change to the interaction between
177 \&\f(CW\*(C`use VERSION\*(C'\fR and \f(CW\*(C`use strict\*(C'\fR. If you specify a version >= 5.11, strict is
178 enabled implicitly. If you request a version < 5.11, strict will become
179 disabled \fIeven if you had previously written\fR \f(CW\*(C`use strict\*(C'\fR. This was not
180 the previous behaviour of \f(CW\*(C`use VERSION\*(C'\fR, which at present will track
181 explicitly\-enabled strictness flags independently.
182 .PP
183 Category: "deprecated::version_downgrade"
184 .SS "Perl 5.38"
185 .IX Subsection "Perl 5.38"
186 \fIPod::Html utility functions\fR
187 .IX Subsection "Pod::Html utility functions"
188 .PP
189 The definition and documentation of three utility functions previously
190 importable from Pod::Html were moved to new package Pod::Html::Util in
191 Perl 5.36. While they remained importable from Pod::Html in Perl 5.36, as
192 of Perl 5.38 they are only importable, on request, from Pod::Html::Util.
193 .SS "Perl 5.34"
194 .IX Subsection "Perl 5.34"
195 There were no deprecations or fatalizations in Perl 5.34.
196 .SS "Perl 5.32"
197 .IX Subsection "Perl 5.32"
198 \fIConstants from lexical variables potentially modified elsewhere\fR
199 .IX Subsection "Constants from lexical variables potentially modified elsewhere"
200 .PP
201 You wrote something like
202 .PP
203 .Vb 2
204 \& my $var;
205 \& $sub = sub () { $var };
206 .Ve
207 .PP
208 but \f(CW$var\fR is referenced elsewhere and could be modified after the \f(CW\*(C`sub\*(C'\fR
209 expression is evaluated. Either it is explicitly modified elsewhere
210 (\f(CW\*(C`$var = 3\*(C'\fR) or it is passed to a subroutine or to an operator like
211 \&\f(CW\*(C`printf\*(C'\fR or \f(CW\*(C`map\*(C'\fR, which may or may not modify the variable.
212 .PP
213 Traditionally, Perl has captured the value of the variable at that
214 point and turned the subroutine into a constant eligible for inlining.
215 In those cases where the variable can be modified elsewhere, this
216 breaks the behavior of closures, in which the subroutine captures
217 the variable itself, rather than its value, so future changes to the
218 variable are reflected in the subroutine\*(Aqs return value.
219 .PP
220 If you intended for the subroutine to be eligible for inlining, then
221 make sure the variable is not referenced elsewhere, possibly by
222 copying it:
223 .PP
224 .Vb 2
225 \& my $var2 = $var;
226 \& $sub = sub () { $var2 };
227 .Ve
228 .PP
229 If you do want this subroutine to be a closure that reflects future
230 changes to the variable that it closes over, add an explicit \f(CW\*(C`return\*(C'\fR:
231 .PP
232 .Vb 2
233 \& my $var;
234 \& $sub = sub () { return $var };
235 .Ve
236 .PP
237 This usage was deprecated and as of Perl 5.32 is no longer allowed.
238 .PP
239 \fIUse of strings with code points over 0xFF as arguments to \fR\f(CI\*(C`vec\*(C'\fR
240 .IX Subsection "Use of strings with code points over 0xFF as arguments to vec"
241 .PP
242 \&\f(CW\*(C`vec\*(C'\fR views its string argument as a sequence of bits. A string
243 containing a code point over 0xFF is nonsensical. This usage is
244 deprecated in Perl 5.28, and was removed in Perl 5.32.
245 .PP
246 \fIUse of code points over 0xFF in string bitwise operators\fR
247 .IX Subsection "Use of code points over 0xFF in string bitwise operators"
248 .PP
249 The string bitwise operators, \f(CW\*(C`&\*(C'\fR, \f(CW\*(C`|\*(C'\fR, \f(CW\*(C`^\*(C'\fR, and \f(CW\*(C`~\*(C'\fR, treat their
250 operands as strings of bytes. As such, values above 0xFF are
251 nonsensical. Some instances of these have been deprecated since Perl
252 5.24, and were made fatal in 5.28, but it turns out that in cases where
253 the wide characters did not affect the end result, no deprecation
254 notice was raised, and so remain legal. Now, all occurrences either are
255 fatal or raise a deprecation warning, so that the remaining legal
256 occurrences became fatal in 5.32.
257 .PP
258 An example of this is
259 .PP
260 .Vb 1
261 \& "" & "\ex{100}"
262 .Ve
263 .PP
264 The wide character is not used in the \f(CW\*(C`&\*(C'\fR operation because the left
265 operand is shorter. This now throws an exception.
266 .PP
267 \fR\f(BIhostname()\fR\fI doesn\*(Aqt accept any arguments\fR
268 .IX Subsection "hostname() doesn't accept any arguments"
269 .PP
270 The function \f(CWhostname()\fR in the Sys::Hostname module has always
271 been documented to be called with no arguments. Historically it has not
272 enforced this, and has actually accepted and ignored any arguments. As a
273 result, some users have got the mistaken impression that an argument does
274 something useful. To avoid these bugs, the function is being made strict.
275 Passing arguments was deprecated in Perl 5.28 and became fatal in Perl 5.32.
276 .PP
277 \fIUnescaped left braces in regular expressions\fR
278 .IX Subsection "Unescaped left braces in regular expressions"
279 .PP
280 The simple rule to remember, if you want to match a literal \f(CW\*(C`{\*(C'\fR
281 character (U+007B \f(CW\*(C`LEFT CURLY BRACKET\*(C'\fR) in a regular expression
282 pattern, is to escape each literal instance of it in some way.
283 Generally easiest is to precede it with a backslash, like \f(CW\*(C`\e{\*(C'\fR
284 or enclose it in square brackets (\f(CW\*(C`[{]\*(C'\fR). If the pattern
285 delimiters are also braces, any matching right brace (\f(CW\*(C`}\*(C'\fR) should
286 also be escaped to avoid confusing the parser, for example,
287 .PP
288 .Vb 1
289 \& qr{abc\e{def\e}ghi}
290 .Ve
291 .PP
292 Forcing literal \f(CW\*(C`{\*(C'\fR characters to be escaped will enable the Perl
293 language to be extended in various ways in future releases. To avoid
294 needlessly breaking existing code, the restriction is not enforced in
295 contexts where there are unlikely to ever be extensions that could
296 conflict with the use of \f(CW\*(C`{\*(C'\fR as a literal. A non\-deprecation
297 warning that the left brace is being taken literally is raised in
298 contexts where there could be confusion about it.
299 .PP
300 Literal uses of \f(CW\*(C`{\*(C'\fR were deprecated in Perl 5.20, and some uses of it
301 started to give deprecation warnings since. These cases were made fatal
302 in Perl 5.26. Due to an oversight, not all cases of a use of a literal
303 \&\f(CW\*(C`{\*(C'\fR got a deprecation warning. Some cases started warning in Perl 5.26,
304 and were made fatal in Perl 5.30. Other cases started in Perl 5.28,
305 and were made fatal in 5.32.
306 .PP
307 \fIIn XS code, use of various macros dealing with UTF\-8\fR
308 .IX Subsection "In XS code, use of various macros dealing with UTF-8"
309 .PP
310 The macros below now require an extra parameter compared to versions prior
311 to Perl 5.32. The final parameter in each one is a pointer into the
312 string supplied by the first parameter beyond which the input will not
313 be read. This prevents potential reading beyond the end of the buffer.
314 \&\f(CW\*(C`isALPHANUMERIC_utf8\*(C'\fR,
315 \&\f(CW\*(C`isASCII_utf8\*(C'\fR,
316 \&\f(CW\*(C`isBLANK_utf8\*(C'\fR,
317 \&\f(CW\*(C`isCNTRL_utf8\*(C'\fR,
318 \&\f(CW\*(C`isDIGIT_utf8\*(C'\fR,
319 \&\f(CW\*(C`isIDFIRST_utf8\*(C'\fR,
320 \&\f(CW\*(C`isPSXSPC_utf8\*(C'\fR,
321 \&\f(CW\*(C`isSPACE_utf8\*(C'\fR,
322 \&\f(CW\*(C`isVERTWS_utf8\*(C'\fR,
323 \&\f(CW\*(C`isWORDCHAR_utf8\*(C'\fR,
324 \&\f(CW\*(C`isXDIGIT_utf8\*(C'\fR,
325 \&\f(CW\*(C`isALPHANUMERIC_LC_utf8\*(C'\fR,
326 \&\f(CW\*(C`isALPHA_LC_utf8\*(C'\fR,
327 \&\f(CW\*(C`isASCII_LC_utf8\*(C'\fR,
328 \&\f(CW\*(C`isBLANK_LC_utf8\*(C'\fR,
329 \&\f(CW\*(C`isCNTRL_LC_utf8\*(C'\fR,
330 \&\f(CW\*(C`isDIGIT_LC_utf8\*(C'\fR,
331 \&\f(CW\*(C`isGRAPH_LC_utf8\*(C'\fR,
332 \&\f(CW\*(C`isIDCONT_LC_utf8\*(C'\fR,
333 \&\f(CW\*(C`isIDFIRST_LC_utf8\*(C'\fR,
334 \&\f(CW\*(C`isLOWER_LC_utf8\*(C'\fR,
335 \&\f(CW\*(C`isPRINT_LC_utf8\*(C'\fR,
336 \&\f(CW\*(C`isPSXSPC_LC_utf8\*(C'\fR,
337 \&\f(CW\*(C`isPUNCT_LC_utf8\*(C'\fR,
338 \&\f(CW\*(C`isSPACE_LC_utf8\*(C'\fR,
339 \&\f(CW\*(C`isUPPER_LC_utf8\*(C'\fR,
340 \&\f(CW\*(C`isWORDCHAR_LC_utf8\*(C'\fR,
341 \&\f(CW\*(C`isXDIGIT_LC_utf8\*(C'\fR,
342 \&\f(CW\*(C`toFOLD_utf8\*(C'\fR,
343 \&\f(CW\*(C`toLOWER_utf8\*(C'\fR,
344 \&\f(CW\*(C`toTITLE_utf8\*(C'\fR,
345 and
346 \&\f(CW\*(C`toUPPER_utf8\*(C'\fR.
347 .PP
348 Since Perl 5.26, this functionality with the extra parameter has been
349 available by using a corresponding macro to each one of these, and whose
350 name is formed by appending \f(CW\*(C`_safe\*(C'\fR to the base name. There is no
351 change to the functionality of those. For example, \f(CW\*(C`isDIGIT_utf8_safe\*(C'\fR
352 corresponds to \f(CW\*(C`isDIGIT_utf8\*(C'\fR, and both now behave identically. All
353 are documented in "Character case changing" in perlapi and
354 "Character classification" in perlapi.
355 .PP
356 This change was originally scheduled for 5.30, but was delayed until
357 5.32.
358 .PP
359 \fR\f(CIFile::Glob::glob()\fR\fI was removed\fR
360 .IX Subsection "File::Glob::glob() was removed"
361 .PP
362 \&\f(CW\*(C`File::Glob\*(C'\fR had a function called \f(CW\*(C`glob\*(C'\fR, which just called
363 \&\f(CW\*(C`bsd_glob\*(C'\fR.
364 .PP
365 \&\f(CWFile::Glob::glob()\fR was deprecated in Perl 5.8. A deprecation
366 message was issued from Perl 5.26 onwards, the function became fatal
367 in Perl 5.30, and was removed entirely in Perl 5.32.
368 .PP
369 Code using \f(CWFile::Glob::glob()\fR should call
370 \&\f(CWFile::Glob::bsd_glob()\fR instead.
371 .SS "Perl 5.30"
372 .IX Subsection "Perl 5.30"
373 \fR\f(CI$*\fR\fI is no longer supported\fR
374 .IX Subsection "$* is no longer supported"
375 .PP
376 Before Perl 5.10, setting \f(CW$*\fR to a true value globally enabled
377 multi\-line matching within a string. This relic from the past lost
378 its special meaning in 5.10. Use of this variable became a fatal error
379 in Perl 5.30, freeing the variable up for a future special meaning.
380 .PP
381 To enable multiline matching one should use the \f(CW\*(C`/m\*(C'\fR regexp
382 modifier (possibly in combination with \f(CW\*(C`/s\*(C'\fR). This can be set
383 on a per match basis, or can be enabled per lexical scope (including
384 a whole file) with \f(CW\*(C`use re \*(Aq/m\*(Aq\*(C'\fR.
385 .PP
386 \fR\f(CI$#\fR\fI is no longer supported\fR
387 .IX Subsection "$# is no longer supported"
388 .PP
389 This variable used to have a special meaning \-\- it could be used
390 to control how numbers were formatted when printed. This seldom
391 used functionality was removed in Perl 5.10. In order to free up
392 the variable for a future special meaning, its use became a fatal
393 error in Perl 5.30.
394 .PP
395 To specify how numbers are formatted when printed, one is advised
396 to use \f(CW\*(C`printf\*(C'\fR or \f(CW\*(C`sprintf\*(C'\fR instead.
397 .PP
398 \fIAssigning non\-zero to \fR\f(CI$[\fR\fI is fatal\fR
399 .IX Subsection "Assigning non-zero to $[ is fatal"
400 .PP
401 This variable (and the corresponding \f(CW\*(C`array_base\*(C'\fR feature and
402 arybase module) allowed changing the base for array and string
403 indexing operations.
404 .PP
405 Setting this to a non\-zero value has been deprecated since Perl 5.12 and
406 throws a fatal error as of Perl 5.30.
407 .PP
408 \fIUnqualified \fR\f(CIdump()\fR
409 .IX Subsection "Unqualified dump()"
410 .PP
411 Use of \f(CWdump()\fR instead of \f(CWCORE::dump()\fR was deprecated in Perl 5.8,
412 and an unqualified \f(CWdump()\fR is no longer available as of Perl 5.30.
413 .PP
414 See "dump" in perlfunc.
415 .PP
416 \fIUsing \fR\f(BImy()\fR\fI in false conditional\fR
417 .IX Subsection "Using my() in false conditional"
418 .PP
419 There has been a long\-standing bug in Perl that causes a lexical variable
420 not to be cleared at scope exit when its declaration includes a false
421 conditional. Some people have exploited this bug to achieve a kind of
422 static variable. To allow us to fix this bug, people should not be
423 relying on this behavior.
424 .PP
425 Instead, it\*(Aqs recommended one uses \f(CW\*(C`state\*(C'\fR variables to achieve the
426 same effect:
427 .PP
428 .Vb 4
429 \& use 5.10.0;
430 \& sub count {state $counter; return ++ $counter}
431 \& say count (); # Prints 1
432 \& say count (); # Prints 2
433 .Ve
434 .PP
435 \&\f(CW\*(C`state\*(C'\fR variables were introduced in Perl 5.10.
436 .PP
437 Alternatively, you can achieve a similar static effect by
438 declaring the variable in a separate block outside the function, e.g.,
439 .PP
440 .Vb 1
441 \& sub f { my $x if 0; return $x++ }
442 .Ve
443 .PP
444 becomes
445 .PP
446 .Vb 1
447 \& { my $x; sub f { return $x++ } }
448 .Ve
449 .PP
450 The use of \f(CWmy()\fR in a false conditional has been deprecated in
451 Perl 5.10, and became a fatal error in Perl 5.30.
452 .PP
453 \fIReading/writing bytes from/to :utf8 handles\fR
454 .IX Subsection "Reading/writing bytes from/to :utf8 handles"
455 .PP
456 The \fBsysread()\fR, \fBrecv()\fR, \fBsyswrite()\fR and \fBsend()\fR operators are
457 deprecated on handles that have the \f(CW\*(C`:utf8\*(C'\fR layer, either explicitly, or
458 implicitly, eg., with the \f(CW:encoding(UTF\-16LE)\fR layer.
459 .PP
460 Both \fBsysread()\fR and \fBrecv()\fR currently use only the \f(CW\*(C`:utf8\*(C'\fR flag for the stream,
461 ignoring the actual layers. Since \fBsysread()\fR and \fBrecv()\fR do no UTF\-8
462 validation they can end up creating invalidly encoded scalars.
463 .PP
464 Similarly, \fBsyswrite()\fR and \fBsend()\fR use only the \f(CW\*(C`:utf8\*(C'\fR flag, otherwise ignoring
465 any layers. If the flag is set, both write the value UTF\-8 encoded, even if
466 the layer is some different encoding, such as the UTF\-16LE example above.
467 .PP
468 Ideally, all of these operators would completely ignore the \f(CW\*(C`:utf8\*(C'\fR state,
469 working only with bytes, but this would result in silently breaking existing
470 code. To avoid this a future version of perl will throw an exception when
471 any of \fBsysread()\fR, \fBrecv()\fR, \fBsyswrite()\fR or \fBsend()\fR are called on handles with the
472 \&\f(CW\*(C`:utf8\*(C'\fR layer.
473 .PP
474 As of Perl 5.30, it is no longer possible to use \fBsysread()\fR, \fBrecv()\fR,
475 \&\fBsyswrite()\fR or \fBsend()\fR to read or send bytes from/to \f(CW\*(C`:utf8\*(C'\fR handles.
476 .PP
477 \fIUse of unassigned code point or non\-standalone grapheme for a delimiter\fR
478 .IX Subsection "Use of unassigned code point or non-standalone grapheme for a delimiter"
479 .PP
480 A grapheme is what appears to a native speaker of a language to be a
481 character. In Unicode (and hence Perl) a grapheme may actually be
482 several adjacent characters that together form a complete grapheme. For
483 example, there can be a base character, like "R" and an accent, like a
484 circumflex "^", that appear to be a single character when displayed,
485 with the circumflex hovering over the "R".
486 .PP
487 As of Perl 5.30, use of delimiters which are non\-standalone graphemes is
488 fatal, in order to move the language to be able to accept
489 multi\-character graphemes as delimiters.
490 .PP
491 Also, as of Perl 5.30, delimiters which are unassigned code points
492 but that may someday become assigned are prohibited. Otherwise, code
493 that works today would fail to compile if the currently unassigned
494 delimiter ends up being something that isn\*(Aqt a stand\-alone grapheme.
495 Because Unicode is never going to assign non\-character code
496 points, nor code points that are
497 above the legal Unicode maximum, those can be delimiters.
498 .SS "Perl 5.28"
499 .IX Subsection "Perl 5.28"
500 \fIAttributes \fR\f(CI\*(C`:locked\*(C'\fR\fI and \fR\f(CI\*(C`:unique\*(C'\fR
501 .IX Subsection "Attributes :locked and :unique"
502 .PP
503 The attributes \f(CW\*(C`:locked\*(C'\fR (on code references) and \f(CW\*(C`:unique\*(C'\fR
504 (on array, hash and scalar references) have had no effect since
505 Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated
506 since.
507 .PP
508 As of Perl 5.28, these attributes are syntax errors. Since the
509 attributes do not do anything, removing them from your code fixes
510 the syntax error; and removing them will not influence the behaviour
511 of your code.
512 .PP
513 \fIBare here\-document terminators\fR
514 .IX Subsection "Bare here-document terminators"
515 .PP
516 Perl has allowed you to use a bare here\-document terminator \f(CW\*(C`<<\*(C'\fR to
517 have the here\-document end at the first empty line. This practise was
518 deprecated in Perl 5.000; as of Perl 5.28, using a bare here\-document
519 terminator throws a fatal error.
520 .PP
521 You are encouraged to use the explicitly quoted form if you wish to
522 use an empty line as the terminator of the here\-document:
523 .PP
524 .Vb 2
525 \& print <<"";
526 \& Print this line.
527 \&
528 \& # Previous blank line ends the here\-document.
529 .Ve
530 .PP
531 \fISetting $/ to a reference to a non\-positive integer\fR
532 .IX Subsection "Setting $/ to a reference to a non-positive integer"
533 .PP
534 You assigned a reference to a scalar to \f(CW$/\fR where the
535 referenced item is not a positive integer. In older perls this \fBappeared\fR
536 to work the same as setting it to \f(CW\*(C`undef\*(C'\fR but was in fact internally
537 different, less efficient and with very bad luck could have resulted in
538 your file being split by a stringified form of the reference.
539 .PP
540 In Perl 5.20.0 this was changed so that it would be \fBexactly\fR the same as
541 setting \f(CW$/\fR to \f(CW\*(C`undef\*(C'\fR, with the exception that this warning would be
542 thrown.
543 .PP
544 As of Perl 5.28, setting \f(CW$/\fR to a reference to a non\-positive
545 integer throws a fatal error.
546 .PP
547 You are recommended to change your code to set \f(CW$/\fR to \f(CW\*(C`undef\*(C'\fR explicitly
548 if you wish to slurp the file.
549 .PP
550 \fILimit on the value of Unicode code points\fR
551 .IX Subsection "Limit on the value of Unicode code points"
552 .PP
553 Unicode only allows code points up to 0x10FFFF, but Perl allows
554 much larger ones. Up till Perl 5.28, it was allowed to use code
555 points exceeding the maximum value of an integer (\f(CW\*(C`IV_MAX\*(C'\fR).
556 However, that did break the perl interpreter in some constructs,
557 including causing it to hang in a few cases. The known problem
558 areas were in \f(CW\*(C`tr///\*(C'\fR, regular expression pattern matching using
559 quantifiers, as quote delimiters in \f(CW\*(C`q\fR\f(CIX\fR\f(CW...\fR\f(CIX\fR\f(CW\*(C'\fR (where \fIX\fR is
560 the \f(CWchr()\fR of a large code point), and as the upper limits in
561 loops.
562 .PP
563 The use of out\-of\-range code points was deprecated in Perl 5.24; as of
564 Perl 5.28 using a code point exceeding \f(CW\*(C`IV_MAX\*(C'\fR throws a fatal error.
565 .PP
566 If your code is to run on various platforms, keep in mind that the upper
567 limit depends on the platform. It is much larger on 64\-bit word sizes
568 than 32\-bit ones. For 32\-bit integers, \f(CW\*(C`IV_MAX\*(C'\fR equals \f(CW0x7FFFFFFF\fR;
569 for 64\-bit integers, \f(CW\*(C`IV_MAX\*(C'\fR equals \f(CW0x7FFFFFFFFFFFFFFF\fR.
570 .PP
571 \fIUse of comma\-less variable list in formats\fR
572 .IX Subsection "Use of comma-less variable list in formats"
573 .PP
574 It was allowed to use a list of variables in a format, without
575 separating them with commas. This usage has been deprecated
576 for a long time, and as of Perl 5.28, this throws a fatal error.
577 .PP
578 \fIUse of \fR\f(CI\*(C`\eN{}\*(C'\fR
579 .IX Subsection "Use of N{}"
580 .PP
581 Use of \f(CW\*(C`\eN{}\*(C'\fR with nothing between the braces was deprecated in
582 Perl 5.24, and throws a fatal error as of Perl 5.28.
583 .PP
584 Since such a construct is equivalent to using an empty string,
585 you are recommended to remove such \f(CW\*(C`\eN{}\*(C'\fR constructs.
586 .PP
587 \fIUsing the same symbol to open a filehandle and a dirhandle\fR
588 .IX Subsection "Using the same symbol to open a filehandle and a dirhandle"
589 .PP
590 It used to be legal to use \f(CWopen()\fR to associate both a
591 filehandle and a dirhandle to the same symbol (glob or scalar).
592 This idiom is likely to be confusing, and it was deprecated in
593 Perl 5.10.
594 .PP
595 Using the same symbol to \f(CWopen()\fR a filehandle and a dirhandle
596 throws a fatal error as of Perl 5.28.
597 .PP
598 You should be using two different symbols instead.
599 .PP
600 \fI${^ENCODING} is no longer supported\fR
601 .IX Subsection "${^ENCODING} is no longer supported"
602 .PP
603 The special variable \f(CW\*(C`${^ENCODING}\*(C'\fR was used to implement
604 the \f(CW\*(C`encoding\*(C'\fR pragma. Setting this variable to anything other
605 than \f(CW\*(C`undef\*(C'\fR was deprecated in Perl 5.22. Full deprecation
606 of the variable happened in Perl 5.25.3.
607 .PP
608 Setting this variable to anything other than an undefined value
609 throws a fatal error as of Perl 5.28.
610 .PP
611 \fR\f(CI\*(C`B::OP::terse\*(C'\fR\fI\fR
612 .IX Subsection "B::OP::terse"
613 .PP
614 This method, which just calls \f(CW\*(C`B::Concise::b_terse\*(C'\fR, has been
615 deprecated, and disappeared in Perl 5.28. Please use
616 B::Concise instead.
617 .PP
618 \fIUse of inherited AUTOLOAD for non\-method \fR\f(CI%s::\fR\fI%s() is no longer allowed\fR
619 .IX Subsection "Use of inherited AUTOLOAD for non-method %s::%s() is no longer allowed"
620 .PP
621 As an (ahem) accidental feature, \f(CW\*(C`AUTOLOAD\*(C'\fR subroutines were looked
622 up as methods (using the \f(CW@ISA\fR hierarchy) even when the subroutines
623 to be autoloaded were called as plain functions (e.g. \f(CWFoo::bar()\fR),
624 not as methods (e.g. \f(CW\*(C`Foo\->bar()\*(C'\fR or \f(CW\*(C`$obj\->bar()\*(C'\fR).
625 .PP
626 This bug was deprecated in Perl 5.004 and has been rectified in Perl 5.28
627 by using method lookup only for methods\*(Aq \f(CW\*(C`AUTOLOAD\*(C'\fRs.
628 .PP
629 The simple rule is: Inheritance will not work when autoloading
630 non\-methods. The simple fix for old code is: In any module that used
631 to depend on inheriting \f(CW\*(C`AUTOLOAD\*(C'\fR for non\-methods from a base class
632 named \f(CW\*(C`BaseClass\*(C'\fR, execute \f(CW\*(C`*AUTOLOAD = \e&BaseClass::AUTOLOAD\*(C'\fR during
633 startup.
634 .PP
635 In code that currently says \f(CW\*(C`use AutoLoader; @ISA = qw(AutoLoader);\*(C'\fR
636 you should remove AutoLoader from \f(CW@ISA\fR and change \f(CW\*(C`use AutoLoader;\*(C'\fR to
637 \&\f(CW\*(C`use AutoLoader \*(AqAUTOLOAD\*(Aq;\*(C'\fR.
638 .PP
639 \fIIn XS code, use of \fR\f(CIto_utf8_case()\fR
640 .IX Subsection "In XS code, use of to_utf8_case()"
641 .PP
642 This function has been removed as of Perl 5.28; instead convert to call
643 the appropriate one of:
644 \&\f(CW\*(C`toFOLD_utf8_safe\*(C'\fR.
645 \&\f(CW\*(C`toLOWER_utf8_safe\*(C'\fR,
646 \&\f(CW\*(C`toTITLE_utf8_safe\*(C'\fR,
647 or
648 \&\f(CW\*(C`toUPPER_utf8_safe\*(C'\fR.
649 .SS "Perl 5.26"
650 .IX Subsection "Perl 5.26"
651 \fR\f(CI\*(C`\-\-libpods\*(C'\fR\fI in \fR\f(CI\*(C`Pod::Html\*(C'\fR\fI\fR
652 .IX Subsection "--libpods in Pod::Html"
653 .PP
654 Since Perl 5.18, the option \f(CW\*(C`\-\-libpods\*(C'\fR has been deprecated, and
655 using this option did not do anything other than producing a warning.
656 .PP
657 The \f(CW\*(C`\-\-libpods\*(C'\fR option is no longer recognized as of Perl 5.26.
658 .PP
659 \fIThe utilities \fR\f(CI\*(C`c2ph\*(C'\fR\fI and \fR\f(CI\*(C`pstruct\*(C'\fR
660 .IX Subsection "The utilities c2ph and pstruct"
661 .PP
662 These old, perl3\-era utilities have been deprecated in favour of
663 \&\f(CW\*(C`h2xs\*(C'\fR for a long time. As of Perl 5.26, they have been removed.
664 .PP
665 \fITrapping \fR\f(CI$SIG{_\|_DIE_\|_}\fR\fI other than during program exit\fR
666 .IX Subsection "Trapping $SIG{__DIE__} other than during program exit"
667 .PP
668 The \f(CW$SIG{_\|_DIE_\|_}\fR hook is called even inside an \f(CWeval()\fR. It was
669 never intended to happen this way, but an implementation glitch made
670 this possible. This used to be deprecated, as it allowed strange action
671 at a distance like rewriting a pending exception in \f(CW$@\fR. Plans to
672 rectify this have been scrapped, as users found that rewriting a
673 pending exception is actually a useful feature, and not a bug.
674 .PP
675 Perl never issued a deprecation warning for this; the deprecation
676 was by documentation policy only. But this deprecation has been
677 lifted as of Perl 5.26.
678 .PP
679 \fIMalformed UTF\-8 string in "%s"\fR
680 .IX Subsection "Malformed UTF-8 string in ""%s"""
681 .PP
682 This message indicates a bug either in the Perl core or in XS
683 code. Such code was trying to find out if a character, allegedly
684 stored internally encoded as UTF\-8, was of a given type, such as
685 being punctuation or a digit. But the character was not encoded
686 in legal UTF\-8. The \f(CW%s\fR is replaced by a string that can be used
687 by knowledgeable people to determine what the type being checked
688 against was.
689 .PP
690 Passing malformed strings was deprecated in Perl 5.18, and
691 became fatal in Perl 5.26.
692 .SS "Perl 5.24"
693 .IX Subsection "Perl 5.24"
694 \fIUse of \fR\f(CI*glob{FILEHANDLE}\fR
695 .IX Subsection "Use of *glob{FILEHANDLE}"
696 .PP
697 The use of \f(CW*glob{FILEHANDLE}\fR was deprecated in Perl 5.8.
698 The intention was to use \f(CW*glob{IO}\fR instead, for which
699 \&\f(CW*glob{FILEHANDLE}\fR is an alias.
700 .PP
701 However, this feature was undeprecated in Perl 5.24.
702 .PP
703 \fICalling POSIX::%s() is deprecated\fR
704 .IX Subsection "Calling POSIX::%s() is deprecated"
705 .PP
706 The following functions in the \f(CW\*(C`POSIX\*(C'\fR module are no longer available:
707 \&\f(CW\*(C`isalnum\*(C'\fR, \f(CW\*(C`isalpha\*(C'\fR, \f(CW\*(C`iscntrl\*(C'\fR, \f(CW\*(C`isdigit\*(C'\fR, \f(CW\*(C`isgraph\*(C'\fR, \f(CW\*(C`islower\*(C'\fR,
708 \&\f(CW\*(C`isprint\*(C'\fR, \f(CW\*(C`ispunct\*(C'\fR, \f(CW\*(C`isspace\*(C'\fR, \f(CW\*(C`isupper\*(C'\fR, and \f(CW\*(C`isxdigit\*(C'\fR. The
709 functions are buggy and don\*(Aqt work on UTF\-8 encoded strings. See their
710 entries in POSIX for more information.
711 .PP
712 The functions were deprecated in Perl 5.20, and removed in Perl 5.24.
713 .SS "Perl 5.16"
714 .IX Subsection "Perl 5.16"
715 \fIUse of \fR\f(CI%s\fR\fI on a handle without * is deprecated\fR
716 .IX Subsection "Use of %s on a handle without * is deprecated"
717 .PP
718 It used to be possible to use \f(CW\*(C`tie\*(C'\fR, \f(CW\*(C`tied\*(C'\fR or \f(CW\*(C`untie\*(C'\fR on a scalar
719 while the scalar holds a typeglob. This caused its filehandle to be
720 tied. It left no way to tie the scalar itself when it held a typeglob,
721 and no way to untie a scalar that had had a typeglob assigned to it.
722 .PP
723 This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16.
724 .PP
725 So now \f(CW\*(C`tie $scalar\*(C'\fR will always tie the scalar, not the handle it holds.
726 To tie the handle, use \f(CW\*(C`tie *$scalar\*(C'\fR (with an explicit asterisk). The same
727 applies to \f(CW\*(C`tied *$scalar\*(C'\fR and \f(CW\*(C`untie *$scalar\*(C'\fR.
728 .SH "SEE ALSO"
729 .IX Header "SEE ALSO"
730 warnings, diagnostics.