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