This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Reapply "docs: clarify effect of $^H, %^H, ${^WARNING_BITS}"
[perl5.git] / pod / perldeprecation.pod
CommitLineData
9021a1cf
A
1=head1 NAME
2
3perldeprecation - list Perl deprecations
4
5=head1 DESCRIPTION
6
7The purpose of this document is to document what has been deprecated
8in Perl, and by which version the deprecated feature will disappear,
9or, for already removed features, when it was removed.
10
11This document will try to discuss what alternatives for the deprecated
12features are available.
13
14The deprecated features will be grouped by the version of Perl in
15which they will be removed.
16
71451039
PE
17=head2 Perl 5.40
18
19=head3 Downgrading a C<use VERSION> to below v5.11
20
21Once Perl has seen a C<use VERSION> declaration that requests a version
22C<v5.11> or above, a subsequent second declaration that requests an earlier
23version will print a deprecation warning. For example,
24
25 use v5.14;
26 say "We can use v5.14's features here";
27
28 use v5.10; # This prints a warning
29
30This behaviour will be removed in Perl 5.40; such a subsequent request will
31become a compile-time error.
32
33This is because of an intended related change to the interaction between
34C<use VERSION> and C<use strict>. If you specify a version >= 5.11, strict is
35enabled implicitly. If you request a version < 5.11, strict will become
36disabled I<even if you had previously written> C<use strict>. This was not
37the previous behaviour of C<use VERSION>, which at present will track
38explicitly-enabled strictness flags independently.
39
68327975
JK
40=head2 Perl 5.38
41
42=head3 Pod::Html utility functions
43
44The definition and documentation of three utility functions previously
45importable from L<Pod::Html> were moved to new package L<Pod::Html::Util> in
46Perl 5.36. While they remain importable from L<Pod::Html> in Perl 5.36, as of
47Perl 5.38 they will only be importable, on request, from L<Pod::Html::Util>.
48
a74d5574
JK
49=head2 Perl 5.34
50
51There are no deprecations or fatalizations scheduled for Perl 5.34.
52
9840d1d6
A
53=head2 Perl 5.32
54
55=head3 Constants from lexical variables potentially modified elsewhere
56
57You wrote something like
58
59 my $var;
60 $sub = sub () { $var };
61
62but $var is referenced elsewhere and could be modified after the C<sub>
63expression is evaluated. Either it is explicitly modified elsewhere
64(C<$var = 3>) or it is passed to a subroutine or to an operator like
65C<printf> or C<map>, which may or may not modify the variable.
66
67Traditionally, Perl has captured the value of the variable at that
68point and turned the subroutine into a constant eligible for inlining.
69In those cases where the variable can be modified elsewhere, this
70breaks the behavior of closures, in which the subroutine captures
71the variable itself, rather than its value, so future changes to the
72variable are reflected in the subroutine's return value.
73
74If you intended for the subroutine to be eligible for inlining, then
75make sure the variable is not referenced elsewhere, possibly by
76copying it:
77
78 my $var2 = $var;
79 $sub = sub () { $var2 };
80
81If you do want this subroutine to be a closure that reflects future
82changes to the variable that it closes over, add an explicit C<return>:
83
84 my $var;
85 $sub = sub () { return $var };
86
c6b2e294 87This usage was deprecated and as of Perl 5.32 is no longer allowed.
9840d1d6 88
fada8285 89=head3 Use of strings with code points over 0xFF as arguments to C<vec>
76aae383
KW
90
91C<vec> views its string argument as a sequence of bits. A string
92containing a code point over 0xFF is nonsensical. This usage is
da5a0da2 93deprecated in Perl 5.28, and was removed in Perl 5.32.
76aae383 94
ba52ce15
KW
95=head3 Use of code points over 0xFF in string bitwise operators
96
97The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat their
98operands as strings of bytes. As such, values above 0xFF are
99nonsensical. Some instances of these have been deprecated since Perl
1005.24, and were made fatal in 5.28, but it turns out that in cases where
101the wide characters did not affect the end result, no deprecation
102notice was raised, and so remain legal. Now, all occurrences either are
103fatal or raise a deprecation warning, so that the remaining legal
c8b94fe0 104occurrences became fatal in 5.32.
ba52ce15
KW
105
106An example of this is
107
108 "" & "\x{100}"
109
110The wide character is not used in the C<&> operation because the left
c8b94fe0 111operand is shorter. This now throws an exception.
ba52ce15 112
0c9c439d
Z
113=head3 hostname() doesn't accept any arguments
114
115The function C<hostname()> in the L<Sys::Hostname> module has always
116been documented to be called with no arguments. Historically it has not
117enforced this, and has actually accepted and ignored any arguments. As a
118result, some users have got the mistaken impression that an argument does
119something useful. To avoid these bugs, the function is being made strict.
c6b2e294 120Passing arguments was deprecated in Perl 5.28 and became fatal in Perl 5.32.
0c9c439d 121
0367231c
KW
122=head3 Unescaped left braces in regular expressions
123
124The simple rule to remember, if you want to match a literal C<{>
125character (U+007B C<LEFT CURLY BRACKET>) in a regular expression
126pattern, is to escape each literal instance of it in some way.
127Generally easiest is to precede it with a backslash, like C<\{>
128or enclose it in square brackets (C<[{]>). If the pattern
129delimiters are also braces, any matching right brace (C<}>) should
130also be escaped to avoid confusing the parser, for example,
131
132 qr{abc\{def\}ghi}
133
134Forcing literal C<{> characters to be escaped will enable the Perl
135language to be extended in various ways in future releases. To avoid
a3815e44 136needlessly breaking existing code, the restriction is not enforced in
0367231c 137contexts where there are unlikely to ever be extensions that could
b2247a87
KW
138conflict with the use there of C<{> as a literal. A non-deprecation
139warning that the left brace is being taken literally is raised in
140contexts where there could be confusion about it.
0367231c
KW
141
142Literal uses of C<{> were deprecated in Perl 5.20, and some uses of it
143started to give deprecation warnings since. These cases were made fatal
144in Perl 5.26. Due to an oversight, not all cases of a use of a literal
145C<{> got a deprecation warning. Some cases started warning in Perl 5.26,
c96bf7f6 146and were made fatal in Perl 5.30. Other cases started in Perl 5.28,
ded8ea47 147and were made fatal in 5.32.
0367231c 148
5203d63d
KW
149=head3 In XS code, use of various macros dealing with UTF-8.
150
059703b0
KW
151The macros below now require an extra parameter than in versions prior
152to Perl 5.32. The final parameter in each one is a pointer into the
153string supplied by the first parameter beyond which the input will not
154be read. This prevents potential reading beyond the end of the buffer.
5203d63d
KW
155C<isALPHANUMERIC_utf8>,
156C<isASCII_utf8>,
157C<isBLANK_utf8>,
158C<isCNTRL_utf8>,
159C<isDIGIT_utf8>,
160C<isIDFIRST_utf8>,
161C<isPSXSPC_utf8>,
162C<isSPACE_utf8>,
163C<isVERTWS_utf8>,
164C<isWORDCHAR_utf8>,
165C<isXDIGIT_utf8>,
166C<isALPHANUMERIC_LC_utf8>,
167C<isALPHA_LC_utf8>,
168C<isASCII_LC_utf8>,
169C<isBLANK_LC_utf8>,
170C<isCNTRL_LC_utf8>,
171C<isDIGIT_LC_utf8>,
172C<isGRAPH_LC_utf8>,
173C<isIDCONT_LC_utf8>,
174C<isIDFIRST_LC_utf8>,
175C<isLOWER_LC_utf8>,
176C<isPRINT_LC_utf8>,
177C<isPSXSPC_LC_utf8>,
178C<isPUNCT_LC_utf8>,
179C<isSPACE_LC_utf8>,
180C<isUPPER_LC_utf8>,
181C<isWORDCHAR_LC_utf8>,
182C<isXDIGIT_LC_utf8>,
183C<toFOLD_utf8>,
184C<toLOWER_utf8>,
185C<toTITLE_utf8>,
186and
187C<toUPPER_utf8>.
188
059703b0
KW
189Since Perl 5.26, this functionality with the extra parameter has been
190available by using a corresponding macro to each one of these, and whose
191name is formed by appending C<_safe> to the base name. There is no
192change to the functionality of those. For example, C<isDIGIT_utf8_safe>
193corresponds to C<isDIGIT_utf8>, and both now behave identically. All
194are documented in L<perlapi/Character case changing> and
5203d63d
KW
195L<perlapi/Character classification>.
196
ded8ea47
KW
197This change was originally scheduled for 5.30, but was delayed until
1985.32.
5203d63d 199
4db50d5b
S
200=head3 C<< File::Glob::glob() >> was removed
201
202C<< File::Glob >> has a function called C<< glob >>, which just calls
203C<< bsd_glob >>.
204
205C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation
793b4089
DIM
206message was issued from Perl 5.26 onwards, the function became fatal
207in Perl 5.30, and was removed entirely in Perl 5.32.
4db50d5b
S
208
209Code using C<< File::Glob::glob() >> should call
210C<< File::Glob::bsd_glob() >> instead.
211
a0e213fc
A
212=head2 Perl 5.30
213
37398dc1
A
214=head3 C<< $* >> is no longer supported
215
216Before Perl 5.10, setting C<< $* >> to a true value globally enabled
217multi-line matching within a string. This relique from the past lost
793b4089 218its special meaning in 5.10. Use of this variable became a fatal error
37398dc1
A
219in Perl 5.30, freeing the variable up for a future special meaning.
220
221To enable multiline matching one should use the C<< /m >> regexp
222modifier (possibly in combination with C<< /s >>). This can be set
223on a per match bases, or can be enabled per lexical scope (including
224a whole file) with C<< use re '/m' >>.
225
226=head3 C<< $# >> is no longer supported
227
228This variable used to have a special meaning -- it could be used
229to control how numbers were formatted when printed. This seldom
230used functionality was removed in Perl 5.10. In order to free up
793b4089 231the variable for a future special meaning, its use became a fatal
37398dc1
A
232error in Perl 5.30.
233
33f0d962 234To specify how numbers are formatted when printed, one is advised
37398dc1
A
235to use C<< printf >> or C<< sprintf >> instead.
236
c22e17d0 237=head3 Assigning non-zero to C<< $[ >> is fatal
8e796115
DIM
238
239This variable (and the corresponding C<array_base> feature and
c22e17d0 240L<arybase> module) allowed changing the base for array and string
8e796115
DIM
241indexing operations.
242
243Setting this to a non-zero value has been deprecated since Perl 5.12 and
c22e17d0 244throws a fatal error as of Perl 5.30.
8e796115 245
a0e213fc
A
246=head3 C<< File::Glob::glob() >> will disappear
247
248C<< File::Glob >> has a function called C<< glob >>, which just calls
249C<< bsd_glob >>. However, its prototype is different from the prototype
250of C<< CORE::glob >>, and hence, C<< File::Glob::glob >> should not
251be used.
252
d1be68f6 253C<< File::Glob::glob() >> was deprecated in Perl 5.8. A deprecation
793b4089
DIM
254message was issued from Perl 5.26 onwards, and in Perl 5.30 this was
255turned into a fatal error.
a0e213fc
A
256
257Code using C<< File::Glob::glob() >> should call
258C<< File::Glob::bsd_glob() >> instead.
259
0367231c 260=head3 Unescaped left braces in regular expressions (for 5.30)
286c9456 261
0367231c 262See L</Unescaped left braces in regular expressions> above.
286c9456 263
30b17cc1
A
264=head3 Unqualified C<dump()>
265
266Use of C<dump()> instead of C<CORE::dump()> was deprecated in Perl 5.8,
793b4089 267and an unqualified C<dump()> is no longer available as of Perl 5.30.
30b17cc1
A
268
269See L<perlfunc/dump>.
270
286c9456 271
afb5c82e 272=head3 Using my() in false conditional.
c437f7ac
A
273
274There has been a long-standing bug in Perl that causes a lexical variable
275not to be cleared at scope exit when its declaration includes a false
276conditional. Some people have exploited this bug to achieve a kind of
bbadd5d3 277static variable. To allow us to fix this bug, people should not be
c437f7ac
A
278relying on this behavior.
279
280Instead, it's recommended one uses C<state> variables to achieve the
281same effect:
282
283 use 5.10.0;
284 sub count {state $counter; return ++ $counter}
285 say count (); # Prints 1
286 say count (); # Prints 2
287
288C<state> variables were introduced in Perl 5.10.
289
290Alternatively, you can achieve a similar static effect by
bbadd5d3 291declaring the variable in a separate block outside the function, e.g.,
c437f7ac
A
292
293 sub f { my $x if 0; return $x++ }
294
295becomes
296
297 { my $x; sub f { return $x++ } }
298
299The use of C<my()> in a false conditional has been deprecated in
bbadd5d3 300Perl 5.10, and became a fatal error in Perl 5.30.
c437f7ac 301
1972ac5c
A
302
303=head3 Reading/writing bytes from/to :utf8 handles.
304
305The sysread(), recv(), syswrite() and send() operators are
306deprecated on handles that have the C<:utf8> layer, either explicitly, or
307implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
308
309Both sysread() and recv() currently use only the C<:utf8> flag for the stream,
310ignoring the actual layers. Since sysread() and recv() do no UTF-8
311validation they can end up creating invalidly encoded scalars.
312
313Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise ignoring
314any layers. If the flag is set, both write the value UTF-8 encoded, even if
315the layer is some different encoding, such as the example above.
316
317Ideally, all of these operators would completely ignore the C<:utf8> state,
318working only with bytes, but this would result in silently breaking existing
319code. To avoid this a future version of perl will throw an exception when
320any of sysread(), recv(), syswrite() or send() are called on handle with the
321C<:utf8> layer.
322
793b4089 323As of Perl 5.30, it is no longer be possible to use sysread(), recv(),
1972ac5c
A
324syswrite() or send() to read or send bytes from/to :utf8 handles.
325
30573109
A
326
327=head3 Use of unassigned code point or non-standalone grapheme for a delimiter.
328
329A grapheme is what appears to a native-speaker of a language to be a
330character. In Unicode (and hence Perl) a grapheme may actually be
331several adjacent characters that together form a complete grapheme. For
332example, there can be a base character, like "R" and an accent, like a
4c821bda
KW
333circumflex "^", that appear to be a single character when displayed,
334with the circumflex hovering over the "R".
335
336As of Perl 5.30, use of delimiters which are non-standalone graphemes is
337fatal, in order to move the language to be able to accept
338multi-character graphemes as delimiters.
339
c96bf7f6 340Also, as of Perl 5.30, delimiters which are unassigned code points
4c821bda
KW
341but that may someday become assigned are prohibited. Otherwise, code
342that works today would fail to compile if the currently unassigned
343delimiter ends up being something that isn't a stand-alone grapheme.
344Because Unicode is never going to assign L<non-character code
345points|perlunicode/Noncharacter code points>, nor L<code points that are
c96bf7f6 346above the legal Unicode maximum|perlunicode/Beyond Unicode code
4c821bda 347points>, those can be delimiters.
30573109 348
c9680906
A
349=head2 Perl 5.28
350
dcc013e3 351=head3 Attributes C<< :locked >> and C<< :unique >>
c9680906
A
352
353The attributes C<< :locked >> (on code references) and C<< :unique >>
354(on array, hash and scalar references) have had no effect since
355Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated
356since.
357
d1f1f359 358As of Perl 5.28, these attributes are syntax errors. Since the
dcc013e3
A
359attributes do not do anything, removing them from your code fixes
360the syntax error; and removing them will not influence the behaviour
361of your code.
c9680906 362
ac641426 363
e5aa3f0b
A
364=head3 Bare here-document terminators
365
366Perl has allowed you to use a bare here-document terminator to have the
367here-document end at the first empty line. This practise was deprecated
d1f1f359 368in Perl 5.000; as of Perl 5.28, using a bare here-document terminator
dcc013e3 369throws a fatal error.
e5aa3f0b 370
33f0d962 371You are encouraged to use the explicitly quoted form if you wish to
e5aa3f0b
A
372use an empty line as the terminator of the here-document:
373
374 print <<"";
375 Print this line.
376
377 # Previous blank line ends the here-document.
378
379
d8940893
A
380=head3 Setting $/ to a reference to a non-positive integer
381
382You assigned a reference to a scalar to C<$/> where the
383referenced item is not a positive integer. In older perls this B<appeared>
384to work the same as setting it to C<undef> but was in fact internally
385different, less efficient and with very bad luck could have resulted in
386your file being split by a stringified form of the reference.
387
388In Perl 5.20.0 this was changed so that it would be B<exactly> the same as
389setting C<$/> to undef, with the exception that this warning would be
390thrown.
391
dcc013e3
A
392As of Perl 5.28, setting C<$/> to a reference of a non-positive
393integer throws a fatal error.
d8940893
A
394
395You are recommended to change your code to set C<$/> to C<undef> explicitly
396if you wish to slurp the file.
397
398
fcdb3ac1
A
399=head3 Limit on the value of Unicode code points.
400
dcc013e3
A
401Unicode only allows code points up to 0x10FFFF, but Perl allows
402much larger ones. Up till Perl 5.28, it was allowed to use code
403points exceeding the maximum value of an integer (C<IV_MAX>).
404However, that did break the perl interpreter in some constructs,
405including causing it to hang in a few cases. The known problem
406areas were in C<tr///>, regular expression pattern matching using
407quantifiers, as quote delimiters in C<qI<X>...I<X>> (where I<X> is
408the C<chr()> of a large code point), and as the upper limits in
409loops.
fcdb3ac1 410
d1f1f359 411The use of out of range code points was deprecated in Perl 5.24; as of
dcc013e3 412Perl 5.28 using a code point exceeding C<IV_MAX> throws a fatal error.
fcdb3ac1
A
413
414If your code is to run on various platforms, keep in mind that the upper
dcc013e3
A
415limit depends on the platform. It is much larger on 64-bit word sizes
416than 32-bit ones. For 32-bit integers, C<IV_MAX> equals C<0x7FFFFFFF>,
417for 64-bit integers, C<IV_MAX> equals C<0x7FFFFFFFFFFFFFFF>.
fcdb3ac1 418
db99d38d 419
6ef4f8b7
A
420=head3 Use of comma-less variable list in formats.
421
dcc013e3 422It was allowed to use a list of variables in a format, without
6ef4f8b7 423separating them with commas. This usage has been deprecated
d1f1f359 424for a long time, and as of Perl 5.28, this throws a fatal error.
6ef4f8b7 425
db99d38d
A
426=head3 Use of C<\N{}>
427
428Use of C<\N{}> with nothing between the braces was deprecated in
be332ba0 429Perl 5.24, and throws a fatal error as of Perl 5.28.
db99d38d
A
430
431Since such a construct is equivalent to using an empty string,
432you are recommended to remove such C<\N{}> constructs.
433
122d6c09
A
434=head3 Using the same symbol to open a filehandle and a dirhandle
435
436It used to be legal to use C<open()> to associate both a
437filehandle and a dirhandle to the same symbol (glob or scalar).
438This idiom is likely to be confusing, and it was deprecated in
439Perl 5.10.
440
441Using the same symbol to C<open()> a filehandle and a dirhandle
d1f1f359 442throws a fatal error as of Perl 5.28.
122d6c09
A
443
444You should be using two different symbols instead.
445
ac641426
A
446=head3 ${^ENCODING} is no longer supported.
447
448The special variable C<${^ENCODING}> was used to implement
449the C<encoding> pragma. Setting this variable to anything other
450than C<undef> was deprecated in Perl 5.22. Full deprecation
451of the variable happened in Perl 5.25.3.
452
dcc013e3 453Setting this variable to anything other than an undefined value
d1f1f359 454throws a fatal error as of Perl 5.28.
ac641426 455
d9d53e86 456
838ba4df
A
457=head3 C<< B::OP::terse >>
458
459This method, which just calls C<< B::Concise::b_terse >>, has been
dcc013e3 460deprecated, and disappeared in Perl 5.28. Please use
838ba4df
A
461C<< B::Concise >> instead.
462
463
d9d53e86 464
dcc013e3 465=head3 Use of inherited AUTOLOAD for non-method %s::%s() is no longer allowed
d9d53e86 466
dcc013e3 467As an (ahem) accidental feature, C<AUTOLOAD> subroutines were looked
d9d53e86
A
468up as methods (using the C<@ISA> hierarchy) even when the subroutines
469to be autoloaded were called as plain functions (e.g. C<Foo::bar()>),
470not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>).
471
dcc013e3
A
472This bug was deprecated in Perl 5.004, has been rectified in Perl 5.28
473by using method lookup only for methods' C<AUTOLOAD>s.
d9d53e86
A
474
475The simple rule is: Inheritance will not work when autoloading
476non-methods. The simple fix for old code is: In any module that used
477to depend on inheriting C<AUTOLOAD> for non-methods from a base class
478named C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during
479startup.
480
481In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);>
482you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
483C<use AutoLoader 'AUTOLOAD';>.
484
d9d53e86 485
ecbcbef0
A
486=head3 Use of code points over 0xFF in string bitwise operators
487
488The string bitwise operators, C<&>, C<|>, C<^>, and C<~>, treat
489their operands as strings of bytes. As such, values above 0xFF
490are nonsensical. Using such code points with these operators
d1f1f359 491was deprecated in Perl 5.24, and is fatal as of Perl 5.28.
ecbcbef0 492
36d3e805
KW
493=head3 In XS code, use of C<to_utf8_case()>
494
f566c7cf 495This function has been removed as of Perl 5.28; instead convert to call
36d3e805
KW
496the appropriate one of:
497L<C<toFOLD_utf8_safe>|perlapi/toFOLD_utf8_safe>.
498L<C<toLOWER_utf8_safe>|perlapi/toLOWER_utf8_safe>,
499L<C<toTITLE_utf8_safe>|perlapi/toTITLE_utf8_safe>,
500or
501L<C<toUPPER_utf8_safe>|perlapi/toUPPER_utf8_safe>.
bfdc8cd3 502
856f8944
A
503=head2 Perl 5.26
504
505=head3 C<< --libpods >> in C<< Pod::Html >>
506
507Since Perl 5.18, the option C<< --libpods >> has been deprecated, and
508using this option did not do anything other than producing a warning.
509
d1f1f359 510The C<< --libpods >> option is no longer recognized as of Perl 5.26.
856f8944
A
511
512
2560602c
A
513=head3 The utilities C<< c2ph >> and C<< pstruct >>
514
515These old, perl3-era utilities have been deprecated in favour of
d1f1f359 516C<< h2xs >> for a long time. As of Perl 5.26, they have been removed.
2560602c 517
d9d53e86 518
4a29ab5e
A
519=head3 Trapping C<< $SIG {__DIE__} >> other than during program exit.
520
521The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was
522never intended to happen this way, but an implementation glitch made
523this possible. This used to be deprecated, as it allowed strange action
524at a distance like rewriting a pending exception in C<$@>. Plans to
525rectify this have been scrapped, as users found that rewriting a
526pending exception is actually a useful feature, and not a bug.
527
528Perl never issued a deprecation warning for this; the deprecation
529was by documentation policy only. But this deprecation has been
d1f1f359 530lifted as of Perl 5.26.
4a29ab5e
A
531
532
24ca4586
A
533=head3 Malformed UTF-8 string in "%s"
534
535This message indicates a bug either in the Perl core or in XS
536code. Such code was trying to find out if a character, allegedly
537stored internally encoded as UTF-8, was of a given type, such as
538being punctuation or a digit. But the character was not encoded
539in legal UTF-8. The C<%s> is replaced by a string that can be used
540by knowledgeable people to determine what the type being checked
541against was.
542
543Passing malformed strings was deprecated in Perl 5.18, and
544became fatal in Perl 5.26.
545
546
9021a1cf
A
547=head2 Perl 5.24
548
549=head3 Use of C<< *glob{FILEHANDLE} >>
550
d1be68f6 551The use of C<< *glob{FILEHANDLE} >> was deprecated in Perl 5.8.
9021a1cf
A
552The intention was to use C<< *glob{IO} >> instead, for which
553C<< *glob{FILEHANDLE} >> is an alias.
554
d1be68f6 555However, this feature was undeprecated in Perl 5.24.
9021a1cf 556
46d7f3c1
A
557=head3 Calling POSIX::%s() is deprecated
558
559The following functions in the C<POSIX> module are no longer available:
560C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>,
561C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>. The
562functions are buggy and don't work on UTF-8 encoded strings. See their
563entries in L<POSIX> for more information.
564
d1be68f6 565The functions were deprecated in Perl 5.20, and removed in Perl 5.24.
46d7f3c1
A
566
567
c4d8d6a2
A
568=head2 Perl 5.16
569
570=head3 Use of %s on a handle without * is deprecated
571
572It used to be possible to use C<tie>, C<tied> or C<untie> on a scalar
573while the scalar holds a typeglob. This caused its filehandle to be
574tied. It left no way to tie the scalar itself when it held a typeglob,
575and no way to untie a scalar that had had a typeglob assigned to it.
576
d1be68f6 577This was deprecated in Perl 5.14, and the bug was fixed in Perl 5.16.
c4d8d6a2
A
578
579So now C<tie $scalar> will always tie the scalar, not the handle it holds.
580To tie the handle, use C<tie *$scalar> (with an explicit asterisk). The same
581applies to C<tied *$scalar> and C<untie *$scalar>.
582
583
9021a1cf
A
584=head1 SEE ALSO
585
586L<warnings>, L<diagnostics>.
587
588=cut