PERL5005DELTA(1perl)

๐Ÿ“ฆ
version 5.44.0 ยท 2 versions
, in arch rolling

๐Ÿ’– perl5005delta โ€” what's new for perl5.005 ๐Ÿ’–


โœจ NAME โœจ

perl5005delta โ€” bestie, this is literally the "what's new for perl5.005" glow-up doc ๐ŸŽ€

๐ŸŒธ DESCRIPTION ๐ŸŒธ

This doc spills all the tea on what changed between the 5.004 release and this one. Sit down, get comfy, we're going through everything ๐Ÿซถ

๐Ÿฆ‹ About the new versioning system

Okay so here's the vibe: Perl is now developed on two tracks ๐Ÿ’…

  • a maintenance track that makes small, safe updates to released production versions, with the whole emphasis on compatibility
  • a development track that pursues more aggressive evolution

Maintenance releases (which you should consider production quality) have subversion numbers that run from 1 to 49, and development releases (which you should consider "alpha" quality) run from 50 to 99.

Perl 5.005 is the combined product of the new dual-track development scheme. Iconic of it, honestly โœจ

๐Ÿ’€ Incompatible Changes ๐Ÿ’€

๐Ÿšจ WARNING: This version is not binary compatible with Perl 5.004 ๐Ÿšจ

Starting with Perl 5.004_50 there were many deep and far-reaching changes to the language internals. So listen: if you have dynamically loaded extensions that you built under perl 5.003 or 5.004, you can keep using them with 5.004, but you will need to rebuild and reinstall those extensions to use them 5.005. See INSTALL for detailed instructions on how to upgrade. No skipping this step, bestie ๐Ÿ˜ญ

๐Ÿ  Default installation structure has changed

The new Configure defaults are designed to allow a smooth upgrade from 5.004 to 5.005, but you should read INSTALL for a detailed discussion of the changes so you can adapt them to your system. Read the docs, I'm begging ๐Ÿ™

๐Ÿช Perl Source Compatibility

When none of the experimental features are enabled, there should be very few user-visible Perl source compatibility issues. Slay.

If threads are enabled, then some caveats apply. @_ and $_ become lexical variables. The effect of this should be largely transparent to the user, but there are some boundary conditions under which you'll need to be aware of the issues. For example, local(@_) results in a "Can't localize lexical variable @_ ..." message. This may be enabled in a future version.

Some new keywords have been introduced. These are generally expected to have very little impact on compatibility. See "New INIT keyword", "New lock keyword", and "New qr// operator".

Certain barewords are now reserved. Use of these will provoke a warning if you have asked for them with the -w switch. See "our" is now a reserved word. ๐Ÿ‘€

๐Ÿ”ง C Source Compatibility

There have been a large number of changes in the internals to support the new features in this release.

  • Core sources now require ANSI C compiler โ€” An ANSI C compiler is now required to build perl. See INSTALL.
  • All Perl global variables must now be referenced with an explicit prefix โ€” All Perl global variables that are visible for use by extensions now have a PL_ prefix. New extensions should not refer to perl globals by their unqualified names. To preserve sanity, we provide limited backward compatibility for globals that are being widely used like sv_undef and na (which should now be written as PL_sv_undef, PL_na etc.).

If you find that your XS extension does not compile anymore because a perl global is not visible, try adding a PL_ prefix to the global and rebuild.

It is strongly recommended that all functions in the Perl API that don't begin with perl be referenced with a Perl_ prefix. The bare function names without the Perl_ prefix are supported with macros, but this support may cease in a future release. โš ๏ธ

See perlapi.

  • Enabling threads has source compatibility issues โ€” Perl built with threading enabled requires extensions to use the new dTHR macro to initialize the handle to access per-thread data. If you see a compiler error that talks about the variable thr not being declared (when building a module that has XS code), you need to add dTHR; at the beginning of the block that elicited the error.

The API function perl_get_sv("@",GV_ADD) should be used instead of directly accessing perl globals as GvSV(errgv). The API call is backward compatible with existing perls and provides source compatibility with threading is enabled.

See "C Source Compatibility" for more information.

๐Ÿงฉ Binary Compatibility

This version is NOT binary compatible with older versions. All extensions will need to be recompiled. Further, binaries built with threads enabled are incompatible with binaries built without. This should largely be transparent to the user, since all binary incompatible configurations have their own unique architecture name, and extension binaries get installed at unique locations. This allows coexistence of several configurations in the same directory hierarchy. See INSTALL. Cute and organized ๐Ÿ’…

๐Ÿ”’ Security fixes may affect compatibility

A few taint leaks and taint omissions have been corrected. This may lead to a "failure" of scripts that used to work with older versions. Compiling with -DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes to the tainting behavior. But note that the resulting perl will have known insecurities. ๐Ÿšจ Read that again. Known insecurities. Be careful.

Oneliners with the -e switch do not create temporary files anymore.

๐Ÿ“ข Relaxed new mandatory warnings introduced in 5.004

Many new warnings that were introduced in 5.004 have been made optional. Some of these warnings are still present, but perl's new features make them less often a problem. See "New Diagnostics".

๐Ÿ“œ Licensing

Perl has a new Social Contract for contributors. See Porting/Contract.

The license included in much of the Perl documentation has changed. Most of the Perl documentation was previously under the implicit GNU General Public License or the Artistic License (at the user's choice). Now much of the documentation unambiguously states the terms under which it may be distributed. Those terms are in general much less restrictive than the GNU GPL. See perl and the individual perl manpages listed therein. โœจ

๐Ÿ‘‘ Core Changes ๐Ÿ‘‘

๐Ÿงต Threads

WARNING: Threading is considered an experimental feature. Details of the implementation may change without notice. There are known limitations and some bugs. These are expected to be fixed in future versions.

See README.threads.

๐Ÿ—๏ธ Compiler

WARNING: The Compiler and related tools are considered experimental. Features may change without notice, and there are known limitations and bugs. Since the compiler is fully external to perl, the default configuration will build and install it.

The Compiler produces three different types of transformations of a perl program:

  • The C backend generates C code that captures perl's state just before execution begins. It eliminates the compile-time overheads of the regular perl interpreter, but the run-time performance remains comparatively the same.
  • The CC backend generates optimized C code equivalent to the code path at run-time. The CC backend has greater potential for big optimizations, but only a few optimizations are implemented currently.
  • The Bytecode backend generates a platform independent bytecode representation of the interpreter's state just before execution. Thus, the Bytecode back end also eliminates much of the compilation overhead of the interpreter.

The compiler comes with several valuable utilities. ๐ŸŽ€

  • B::Lint is an experimental module to detect and warn about suspicious code, especially the cases that the -w switch does not detect.
  • B::Deparse can be used to demystify perl code, and understand how perl optimizes certain constructs.
  • B::Xref generates cross reference reports of all definition and use of variables, subroutines and formats in a program.
  • B::Showlex show the lexical variables used by a subroutine or file at a glance.
  • perlcc is a simple frontend for compiling perl.

See ext/B/README, B, and the respective compiler modules.

๐ŸŽฏ Regular Expressions

Perl's regular expression engine has been seriously overhauled, and many new constructs are supported. Several bugs have been fixed. The regex engine ate and left no crumbs ๐Ÿ”ฅ

Here is an itemized summary:

โšก Many new and improved optimizations

Changes in the RE engine:

Unneeded nodes removed;
Substrings merged together;
New types of nodes to process (SUBEXPR)* and similar expressions
    quickly, used if the SUBEXPR has no side effects and matches
    strings of the same length;
Better optimizations by lookup for constant substrings;
Better search for constants substrings anchored by $ ;

Changes in Perl code using RE engine:

More optimizations to s/longer/short/;
study() was not working;
/blah/ may be optimized to an analogue of index() if $& $` $' not seen;
Unneeded copying of matched-against string removed;
Only matched part of the string is copying if $` $' were not seen;

๐Ÿ› Many bug fixes

Note that only the major bug fixes are listed here. See Changes for others.
Backtracking might not restore start of $3.
No feedback if max count for * or + on "complex" subexpression
    was reached, similarly (but at compile time) for {3,34567}
Primitive restrictions on max count introduced to decrease a
    possibility of a segfault;
(ZERO-LENGTH)* could segfault;
(ZERO-LENGTH)* was prohibited;
Long REs were not allowed;
/RE/g could skip matches at the same position after a
  zero-length match;

๐ŸŒŸ New regular expression constructs

The following new syntax elements are supported:

(?<=RE)
(?<!RE)
(?{ CODE })
(?i-x)
(?i:RE)
(?(COND)YES_RE|NO_RE)
(?>RE)
\z

๐Ÿงš New operator for precompiled regular expressions

See "New qr// operator".

๐Ÿ’… Other improvements

Better debugging output (possibly with colors),
    even from non-debugging Perl;
RE engine code now looks like C, not like assembler;
Behaviour of RE modifiable by `use re' directive;
Improved documentation;
Test suite significantly extended;
Syntax [:^upper:] etc., reserved inside character classes;

๐Ÿ’ฅ Incompatible changes

(?i) localized inside enclosing group;
$( is not interpolated into RE any more;
/RE/g may match at the same position (with non-zero length)
    after a zero-length match (bug fix).

See perlre and perlop.

๐Ÿซง Improved malloc()

See banner at the beginning of malloc.c for details.


๐Ÿ”ฅ Quicksort is internally implemented ๐Ÿ”ฅ

bestie, Perl now comes with its own super-duper optimized qsort() routine, and it's giving main character energy. The new qsort() is resistant to inconsistent comparison functions, so Perl's sort() will literally not provoke coredumps anymore when somebody hands it a poorly written sort subroutine ๐Ÿ˜ญ (some of those C library qsort()s that were being used before totally had this problem). And in our testing? The new qsort() needed the minimal number of pair-wise compares on average out of all the known qsort() implementations. ate and left no crumbs fr fr ๐Ÿ‘‘

peep perlfunc/sort for the deets.

๐Ÿšจ Reliable signals ๐Ÿšจ

ngl this one's a bit scary: Perl's signal handling is susceptible to random crashes, because signals arrive asynchronously and the Perl runtime is not reentrant at arbitrary times. it's giving chaos ๐Ÿ’€

but!! there's one experimental implementation of reliable signals available when threads are enabled. go look at Thread::Signal. also check INSTALL for how to build a Perl that's capable of threads ๐Ÿงตโœจ

๐Ÿงš Reliable stack pointers ๐Ÿงš

the internals now reallocate the perl stack only at predictable times. specifically, magic calls never trigger reallocations of the stack, because all reentrancy of the runtime is handled using a "stack of stacks". this should make cached stack pointers way more reliable in the internals and in XSUBs. slay ๐Ÿซถ

๐Ÿ›’ More generous treatment of carriage returns ๐Ÿ›’

so like, Perl used to be super dramatic and complain whenever it encountered literal carriage returns in scripts. now? they're mostly treated like whitespace within program text ๐ŸŒธ

inside string literals and here documents, literal carriage returns are:

  • ignored if they occur paired with linefeeds
  • interpreted as whitespace if they stand alone
โš ๏ธ which means literal carriage returns in files should be avoided, bestie. you can get the older, more compatible (but way less generous) behavior by defining the preprocessor symbol PERL_STRICT_CR when building perl. and ofc all of this has literally nothing whatsoever to do with how escapes like \r are handled within strings โ€” different thing entirely, don't get it twisted.

also note that this doesn't somehow magically let you keep all your text files in DOS format ๐Ÿšซ The generous treatment only applies to files that perl itself parses. if your C compiler doesn't allow carriage returns in files, you may still be unable to build modules that need a C compiler. sad but true ๐Ÿ˜”

๐Ÿ’ง Memory leaks ๐Ÿ’ง

substr, pos and vec don't leak memory anymore when used in lvalue context. and many small leaks that impacted applications embedding multiple interpreters have been fixed too. we love a clean-up era โœจ๐Ÿงผ

๐Ÿซ‚ Better support for multiple interpreters ๐Ÿซ‚

the build-time option -DMULTIPLICITY has had many of its details reworked. some previously global variables that should have been per-interpreter now are ๐ŸŽ€ With care, this allows interpreters to call each other. check out the PerlInterp extension on CPAN for the vibe.

๐ŸŒˆ Behavior of local() on array and hash elements is now well-defined ๐ŸŒˆ

it's well-defined now. periodt. See Temporary Values via local() in perlsub.

๐Ÿชž %! is transparently tied to the Errno module ๐Ÿชž

See perlvar, and Errno. iconic duo tbh.

๐Ÿ’… Pseudo-hashes are supported ๐Ÿ’…

See perlref.

๐Ÿ” EXPR foreach EXPR is supported ๐Ÿ”

See perlsyn.

๐Ÿ‘‘ Keywords can be globally overridden ๐Ÿ‘‘

See perlsub.

๐ŸชŸ $^E is meaningful on Win32 ๐ŸชŸ

See perlvar.

โšก foreach (1..1000000) optimized โšก

foreach (1..1000000) is now optimized into a counting loop. it does not try to allocate a 1000000-size list anymore. literally so efficient, we're obsessed ๐Ÿ“

๐Ÿท๏ธ Foo:: can be used as implicitly quoted package name ๐Ÿท๏ธ

barewords used to cause unintuitive behavior when a subroutine with the same name as a package happened to be defined ๐Ÿ˜ตโ€๐Ÿ’ซ so like, new Foo @args would use the result of the call to Foo() instead of Foo being treated as a literal. the recommended way to write barewords in the indirect object slot is new Foo:: @args.

๐Ÿ“Œ heads up: the method new() is called with a first argument of Foo, not Foo::, when you do that.

๐Ÿ” exists $Foo::{Bar::} tests existence of a package ๐Ÿ”

before this it was literally impossible to test for the existence of a package without actually creating it first ๐Ÿ™ˆ now exists $Foo::{Bar::} can be used to test if the Foo::Bar namespace has been created. so handy ๐ŸŒธ

๐ŸŒ Better locale support ๐ŸŒ

See perllocale.

๐Ÿงฎ Experimental support for 64-bit platforms ๐Ÿงฎ

Perl5 has always had 64-bit support on systems with 64-bit longs. but starting with 5.005, the beginnings of experimental support for systems with 32-bit long and 64-bit long long integers has been added.

so if you add -DUSE_LONG_LONG to your ccflags in config.sh (or manually define it in perl.h) then perl will be built with long long support ๐Ÿ”ฅ

โš ๏ธ bestie, real talk: there will be many compiler warnings, and the resultant perl may not work on all systems. there are many other issues related to third-party extensions and libraries too. this option exists to allow people to work on those issues โ€” it's not a "just turn it on, it's fine" situation, ok?

๐Ÿงช prototype() returns useful results on builtins ๐Ÿงช

See prototype in perlfunc.

๐ŸŽ Extended support for exception handling ๐ŸŽ

die() now accepts a reference value, and $@ gets set to that value in exception traps. this makes it possible to propagate exception objects ๐Ÿ˜ญโœจ

๐Ÿ”ฌ note: this is an undocumented experimental feature. iykyk.

โ™ป๏ธ Re-blessing in DESTROY() supported for chaining DESTROY() methods โ™ป๏ธ

See Destructors in perlobj.

๐Ÿ–จ๏ธ All printf format conversions are handled internally ๐Ÿ–จ๏ธ

See printf in perlfunc.

๐ŸŒฑ New INIT keyword ๐ŸŒฑ

INIT subs are like BEGIN and END, but they get run just before the perl runtime begins execution โฐ e.g., the Perl Compiler makes use of INIT blocks to initialize and resolve pointers to XSUBs. cute and functional.

๐Ÿ”’ New lock keyword ๐Ÿ”’

the lock keyword is the fundamental synchronization primitive in threaded perl ๐Ÿ” when threads are not enabled, it is currently a noop.

to minimize impact on source compatibility this keyword is considered "weak", i.e., any user-defined subroutine of the same name overrides it โ€” unless a use Thread has been seen ๐Ÿ‘€

๐Ÿงต New qr// operator ๐Ÿงต

the qr// operator, which is syntactically similar to the other quote-like operators, is used to create precompiled regular expressions โœจ this compiled form can now be explicitly passed around in variables, and interpolated in other regular expressions. See perlop.

๐Ÿ“› our is now a reserved word ๐Ÿ“›

calling a subroutine with the name our will now provoke a warning when using the -w switch ๐Ÿšจ

๐Ÿงบ Tied arrays are now fully supported ๐Ÿงบ

See Tie::Array.

๐Ÿช Tied handles support is better ๐Ÿช

several missing hooks have been added ๐ŸŽ€ there is also a new base class for TIEARRAY implementations. See Tie::Array.

โœ‚๏ธ 4th argument to substr โœ‚๏ธ

substr() can now both return and replace in one operation ๐Ÿคฏ the optional 4th argument is the replacement string. See substr in perlfunc.

โž– Negative LENGTH argument to splice โž–

splice() with a negative LENGTH argument now works similar to what the LENGTH did for substr(). previously a negative LENGTH was treated as 0. See splice in perlfunc.

๐Ÿช„ Magic lvalues are now more magical ๐Ÿช„

so when you say something like substr($x, 5) = "hi", the scalar returned by substr() is special, in that any modifications to it affect $x. (this is called a 'magic lvalue' because an 'lvalue' is something on the left side of an assignment ๐Ÿ’…)

normally this is exactly what you'd expect to happen, but Perl uses the same magic if you use substr(), pos(), or vec() in a context where they might be modified โ€” like taking a reference with \ or as an argument to a sub that modifies @_.

in previous versions, this 'magic' only went one way, but now changes to the scalar the magic refers to ($x in the above example) affect the magic lvalue too ๐Ÿ˜ณ For instance, this code now acts differently:

$x = "hello";
sub printit {
    $x = "g'bye";
    print $_[0], "\n";
}
printit(substr($x, 0, 5));

in previous versions, this would print hello, but it now prints g'bye. plot twist fr ๐Ÿฟ

๐Ÿ“– <> now reads in records ๐Ÿ“–

if $/ is a reference to an integer, or a scalar that holds an integer, <> will read in records instead of lines ๐Ÿ‘€ For more info, see $/ in perlvar.


๐Ÿ–ฅ๏ธ Supported Platforms ๐Ÿ–ฅ๏ธ

Configure has many incremental improvements โœจ site-wide policy for building perl can now be made persistent, via Policy.sh. Configure also records the command-line arguments used in config.sh. cute, organized, we stan ๐Ÿ“

๐ŸŒŸ New Platforms ๐ŸŒŸ

  • BeOS is now supported ๐ŸŽ‰ See README.beos.
  • DOS is now supported under the DJGPP tools. See README.dos (installed as perldos on some systems).
  • MiNT is now supported. See README.mint.
  • MPE/iX is now supported. See README.mpeix.
  • MVS (aka OS390, aka Open Edition) is now supported. See README.os390 (installed as perlos390 on some systems).
  • Stratus VOS is now supported. See README.vos.

look at all these new platforms showing up and slaying ๐Ÿ’–

๐Ÿ”ง Changes in existing support ๐Ÿ”ง

  • Win32 support has been vastly enhanced ๐ŸชŸ support for Perl Object, a C++ encapsulation of Perl. GCC and EGCS are now supported on Win32. See README.win32, aka perlwin32.
  • VMS configuration system has been rewritten ๐Ÿ” See README.vms (installed as README_vms on some systems).
  • The hints files for most Unix platforms have seen incremental improvements ๐ŸŒธ

โœจ Modules and Pragmata โœจ

okay bestie, gather round, because this is the part where all the new modules and pragmata pull up like a group chat invite ๐Ÿ’–. no cap, thereโ€™s a lot, but itโ€™s all facts with sparkle. letโ€™s go.

๐ŸŒธ New Modules ๐ŸŒธ

  • B โ€” Perl compiler and tools. See B. ๐Ÿ‘‘
  • Data::Dumper โ€” A module to pretty print Perl data. See Data::Dumper. โœจ
  • Dumpvalue โ€” A module to dump perl values to the screen. See Dumpvalue. ๐Ÿซถ
  • Errno โ€” A module to look up errors more conveniently. See Errno. ๐Ÿ’…
  • File::Spec โ€” A portable API for file operations. ๐ŸŽ€
  • ExtUtils::Installed โ€” Query and manage installed modules. ๐Ÿฆ‹
  • ExtUtils::Packlist โ€” Manipulate .packlist files. ๐ŸŒธ
  • Fatal โ€” Make functions/builtins succeed or die. ๐Ÿ’€
  • IPC::SysV โ€” Constants and other support infrastructure for System V IPC operations in perl. ๐Ÿ”ฅ
  • Test โ€” A framework for writing test suites. ๐Ÿงš
  • Tie::Array โ€” Base class for tied arrays. ๐Ÿ’œ
  • Tie::Handle โ€” Base class for tied handles. ๐ŸŒˆ
  • Thread โ€” Perl thread creation, manipulation, and support. โญ
  • attrs โ€” Set subroutine attributes. โœจ
  • fields โ€” Compile-time class fields. ๐Ÿ“
  • re โ€” Various pragmata to control behavior of regular expressions. ๐Ÿ’–

๐Ÿ’… Changes in existing modules ๐Ÿ’…

  • Benchmark โ€” You can now run tests for x seconds instead of guessing the right number of tests to run.

Keeps better time. โฐ

  • Carp โ€” Carp has a new function cluck(). cluck() warns, like carp(), but also adds a stack backtrace to the error message, like confess(). ๐Ÿฆ
  • CGI โ€” CGI has been updated to version 2.42. ๐ŸŽ€
  • Fcntl โ€” More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for large (more than 4G) file access (the 64-bit support is not yet working, though, so no need to get overly excited), Free/Net/OpenBSD locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR. ๐Ÿ”’
  • Math::Complex โ€” The accessors methods Re, Im, arg, abs, rho, theta, methods can ($z->Re()) now also act as mutators ($z->Re(3)). ๐Ÿงฎ
  • Math::Trig โ€” A little bit of radial trigonometry (cylindrical and spherical) added, for example the great circle distance. ๐ŸŒ
  • POSIX โ€” POSIX now has its own platform-specific hints files. ๐Ÿง
  • DB_File โ€” DB_File supports version 2.x of Berkeley DB. See "ext/DB_File/Changes". ๐Ÿ—„๏ธ
  • MakeMaker โ€” MakeMaker now supports writing empty makefiles, provides a way to specify that site umask() policy should be honored. There is also better support for manipulation of .packlist files, and getting information about installed modules.

Extensions that have both architecture-dependent and architecture-independent files are now always installed completely in the architecture-dependent locations. Previously, the shareable parts were shared both across architectures and across perl versions and were therefore liable to be overwritten with newer versions that might have subtle incompatibilities. ๐Ÿ› ๏ธ

  • CPAN โ€” See perlmodinstall and CPAN. ๐Ÿ“ฆ
  • Cwd โ€” Cwd::cwd is faster on most platforms. โšก

๐Ÿ”ง Utility Changes ๐Ÿ”ง

  • "h2ph" and related utilities have been vastly overhauled. ๐Ÿงน
  • "perlcc", a new experimental front end for the compiler is available. ๐Ÿงช
  • The crude GNU "configure" emulator is now called "configure.gnu" to avoid trampling on "Configure" under case-insensitive filesystems. ๐Ÿฉน
  • "perldoc" used to be rather slow. The slower features are now optional. In particular, case-insensitive searches need the "-i" switch, and recursive searches need "-r". You can set these switches in the "PERLDOC" environment variable to get the old behavior. ๐ŸŒโžก๏ธ๐Ÿš€

๐Ÿ“š Documentation Changes ๐Ÿ“š

  • Config.pm now has a glossary of variables. ๐Ÿ“–
  • Porting/patching.pod has detailed instructions on how to create and submit patches for perl. ๐Ÿฉท
  • perlport specifies guidelines on how to write portably. ๐ŸŒ
  • perlmodinstall describes how to fetch and install modules from "CPAN" sites. ๐Ÿ›๏ธ
  • Some more Perl traps are documented now. See perltrap. ๐Ÿชค
  • perlopentut gives a tutorial on using open(). ๐Ÿšช
  • perlreftut gives a tutorial on references. ๐Ÿ”—
  • perlthrtut gives a tutorial on threads. ๐Ÿงต

๐Ÿฉบ New Diagnostics ๐Ÿฉบ

okay bestie, gather round, these are the brand-new error and warning messages that perl 5.005_05 added to its vocabulary. warnings are marked (W), fatal errors (F), and then there's (P) for "internal problem in perl itself, tell the perl porters", (D) for deprecation, and (S) for "something's off with your system config". let's get into it ๐Ÿ’…


Ambiguous call resolved as CORE::%s(), qualify as such or use &

(W) โ€” so you declared a subroutine that has the same name as a Perl keyword, and then you used that name all unqualified for calling one or the other. perl had to pick, and it picked the builtin, because the subroutine isn't imported. ๐Ÿ˜ญ

if you want it interpreted as a subroutine call, either slap an ampersand in front of the subroutine name, or qualify the name with its package. or you can import the subroutine (or fake it with the use subs pragma).

if you want it to silently be the Perl operator, use the CORE:: prefix on the operator (like CORE::log($x)) or declare the subroutine to be an object method (see "attrs"). pick a lane, bestie ๐Ÿซถ

Bad index while coercing array into hash

(F) โ€” the index you looked up in the hash found as the 0'th element of a pseudo-hash is not legal. index values have to be 1 or greater. see perlref.

Bareword "%s" refers to nonexistent package

(W) โ€” you used a qualified bareword of the form Foo::, but the compiler saw no other uses of that namespace before that point. maybe you need to predeclare a package? ๐Ÿค”

Can't call method "%s" on an undefined value

(F) โ€” you used method-call syntax, but the slot filled by the object reference or package name holds an undefined value. something like this reproduces it:

    $BADREF = 42;
    process $BADREF 1,2,3;
    $BADREF->process(1,2,3);

Can't check filesystem of script "%s" for nosuid

(P) โ€” for some reason you can't check the filesystem of the script for nosuid.

Can't coerce array into hash

(F) โ€” you used an array where a hash was expected, but the array has no info on how to map from keys to array indices. you can only do that with arrays that have a hash reference at index 0.

Can't goto subroutine from an eval-string

(F) โ€” the goto subroutine call can't be used to jump out of an eval "string". (you can use it to jump out of an eval {BLOCK}, but you probably don't want to.) ๐Ÿ’€

Can't localize pseudo-hash element

(F) โ€” you said something like local $ar->{'key'}, where $ar is a reference to a pseudo-hash. that hasn't been implemented yet, but you can get a similar effect by localizing the corresponding array element directly: local $ar->[$ar->[0]{'key'}].

Can't use %%! because Errno.pm is not available

(F) โ€” the first time the %! hash is used, perl automatically loads the Errno.pm module. the Errno module is expected to tie the %! hash to provide symbolic names for $! errno values.

Cannot find an opnumber for "%s"

(F) โ€” a string of the form CORE::word was given to prototype(), but there is no builtin with the name word. ๐Ÿ™ˆ

Character class syntax [. .] is reserved for future extensions

(W) โ€” inside regular expression character classes ([]), the syntax that starts with [. and ends with .] is reserved for future extensions. if you need those character sequences inside a regular expression character class, just quote the square brackets with a backslash: \[. and .\].

Character class syntax [: :] is reserved for future extensions

(W) โ€” same deal, bestie. inside regular expression character classes ([]), syntax starting with [: and ending with :] is reserved for future extensions. wanna represent those exact characters inside a class? quote the square brackets with a backslash: \[: and :\].

Character class syntax [= =] is reserved for future extensions

(W) โ€” yep, and again. inside character classes ([]), syntax starting with [= and ending with =] is reserved for future extensions. escape it if you need the literal characters: \[= and =\].

%s: Eval-group in insecure regular expression

(F) โ€” perl caught tainted data while trying to compile a regular expression containing the (?{ ... }) zero-width assertion, which is unsafe. see "(?{ code })" in perlre, and perlsec. ๐Ÿšจ

%s: Eval-group not allowed, use re 'eval'

(F) โ€” a regular expression contained the (?{ ... }) zero-width assertion, but that construct is only allowed when the use re 'eval' pragma is in effect. see "(?{ code })" in perlre.

%s: Eval-group not allowed at run time

(F) โ€” perl tried to compile a regex containing the (?{ ... }) zero-width assertion at run time, the way it would when the pattern contains interpolated values. since that's a security risk, it's not allowed. if you insist, you can still do it by explicitly building the pattern from an interpolated string at run time and using that inside an eval(). see "(?{ code })" in perlre.

Explicit blessing to '' (assuming package main)

(W) โ€” you're blessing a reference to a zero-length string. the effect is blessing the reference into package main. that is usually not what you want. consider giving a default target package, e.g. bless($ref, $p || 'MyPackage'); ๐Ÿ’–

Illegal hex digit ignored

(W) โ€” maybe you tried to use a character other than 0 - 9 or A - F in a hexadecimal number. interpretation of the hexadecimal number stopped right before the illegal character.

No such array field

(F) โ€” you tried to access an array as a hash, but the field name you used isn't defined. the hash at index 0 should map all valid field names to array indices for that to work.

No such field "%s" in variable %s of type %s

(F) โ€” you tried to access a field of a typed variable where the type doesn't know about that field name. field names get looked up in the %FIELDS hash in the type package at compile time. that %FIELDS hash is usually set up with the fields pragma.

Out of memory during ridiculously large request

(F) โ€” you can't allocate more than 2^31+"small amount" bytes. this error is most likely caused by a typo in the Perl program. e.g., $arr[time] instead of $arr[$time]. (iykyk, we've all done it ๐Ÿ˜ญ)

Range iterator outside integer range

(F) โ€” one (or both) of the numeric arguments to the range operator .. is outside the range that integers can represent internally. one possible workaround is to force perl to use magical string increment by prepending 0 to your numbers.

Recursive inheritance detected while looking for method '%s' %s

(F) โ€” more than 100 levels of inheritance were hit while invoking a method. probably means there's an unintended loop in your inheritance hierarchy. ๐Ÿ”

Reference found where even-sized list expected

(W) โ€” you gave a single reference where perl was expecting a list with an even number of elements (for assignment to a hash). this usually means you used the anon hash constructor when you actually meant to use parens. either way, a hash needs key/value pairs.

    %hash = { one => 1, two => 2, };   # WRONG
    %hash = [ qw/ an anon array / ];   # WRONG
    %hash = ( one => 1, two => 2, );   # right
    %hash = qw( one 1 two 2 );                 # also fine

Undefined value assigned to typeglob

(W) โ€” an undefined value got assigned to a typeglob, like *foo = undef. this does nothing. it's possible what you actually meant was undef *foo.

Use of reserved word "%s" is deprecated

(D) โ€” the bareword in question is a reserved word. future versions of perl might use it as a keyword, so you're better off either explicitly quoting the word in a way that fits how it's being used, or just picking a different name entirely. you can suppress this warning for subroutine names by adding a & prefix, or by using a package qualifier, e.g. &our(), or Foo::our().

perl: warning: Setting locale failed.

(S) โ€” the whole warning message looks something like this:

       perl: warning: Setting locale failed.
       perl: warning: Please check that your locale settings:
               LC_ALL = "En_US",
               LANG = (unset)
           are supported and installed on your system.
       perl: warning: Falling back to the standard locale ("C").

exactly which locale settings failed varies. in the example above, the settings were that LC_ALL was "En_US" and LANG had no value. this error means perl detected that you and/or your system administrator set up the so-called variable system but perl couldn't use those settings. not dead serious, fortunately โ€” there's a "default locale" called "C" that perl can and will use, and the script will still run. but before you really fix the problem, you'll get the same error message every single time you run perl. how to actually fix it lives in "LOCALE PROBLEMS" in perllocale. ๐ŸŒˆ


๐Ÿ‘ป Obsolete Diagnostics ๐Ÿ‘ป

these ones? gone. retired. no longer haunting your terminal, bestie. โœจ

Can't mktemp()

(F) โ€” the mktemp() routine failed for some reason while trying to process a -e switch. maybe your /tmp partition is full, or clobbered.

removed because -e doesn't use temporary files any more.

Can't write to temp file for -e: %s

(F) โ€” the write routine failed for some reason while trying to process a -e switch. maybe your /tmp partition is full, or clobbered.

removed because -e doesn't use temporary files any more.

Cannot open temporary file

(F) โ€” the create routine failed for some reason while trying to process a -e switch. maybe your /tmp partition is full, or clobbered.

removed because -e doesn't use temporary files any more.

regexp too big

(F) โ€” the current implementation of regular expressions uses shorts as address offsets within a string. unfortunately that means if your regular expression compiles to longer than 32767, it'll blow up. usually when you want a regex this big, there's a better way to do it with multiple statements. see perlre.


โš™๏ธ Configuration Changes โš™๏ธ

one lil thing you can do: run Configure -Uinstallusrbinperl, which makes installperl skip installing perl also as /usr/bin/perl. useful if you'd rather not modify /usr/bin for whatever reason โ€” but harmful, because so many scripts just assume they'll find Perl at /usr/bin/perl. so likeโ€ฆ choose wisely, queen. ๐Ÿ‘‘

๐Ÿ› BUGS ๐Ÿ›

ok so bestie, you found a bug?? first of all, slay for caring ๐Ÿ’– but before you @ anyone, do a tiny lil vibe check: peep the headers of stuff that got posted recently in the comp.lang.perl.misc newsgroup. there might also be tea at http://www.perl.com/perl/ โ€” that's the Perl Home Page ๐ŸŒธ. someone may have already spilled about it, iykyk.

if you're like "no fr, this one's unreported" ๐Ÿ’… then run the perlbug program that ships with your release. important: trim your bug down to a tiny but sufficient test case ๐Ÿ‘‘ โ€” small, cute, and still reproduces the whole problem, that's the goal. your bug report plus the output of perl -V gets sent off to <perlbug@perl.com> so the Perl porting team can analyse it. they're literally the main characters of keeping perl working ๐Ÿซถ

ngl the "trim it down" part is not optional, bestie โ€” a giant messy report is giving chaos, a tiny test case is giving efficiency ๐Ÿ˜Œ

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • The Changes file โ€” exhaustive deets on what changed. all of it. every crumb. ๐Ÿ“
  • The INSTALL file โ€” how to build Perl, step by step.
  • The README file โ€” general stuff, the chill overview vibes.
  • The Artistic and Copying files โ€” all the copyright information, the legal paperwork era ๐Ÿ“œ

๐Ÿ“œ HISTORY ๐Ÿ“œ

Written by Gurusamy Sarathy <gsar@activestate.com>, with many contributions from The Perl Porters ๐ŸŒˆโœจ

Got omissions or corrections? Send them to <perlbug@perl.com> ๐Ÿ’Œ


and that's a wrap on this whole delta, bestie ๐ŸŽ€ this page is from perl v5.44.0, dated 2026-10-17, and it's the PERL5005DELTA(1perl) manpage โ€” go forth and read the Changes file if you want the truly exhaustive version ๐Ÿ’–๐Ÿฆ‹๐Ÿ’…

๐Ÿ“ฆ where this page comes from
  • arch rolling: perl 5.44.0-1 ยท Artistic-1.0-Perl AND GPL-1.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms