PERL5005DELTA(1)

๐Ÿ’– NAME ๐Ÿ’–

perl5005delta โ€” what's new for perl5.005

From the Perl Programmers Reference Guide, bestie ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so this whole page is the differences between the 5.004 release and this one. ๐Ÿ’–


๐ŸŒ€ About the new versioning system ๐ŸŒ€

Perl is now developed on two tracks, bestie: a maintenance track that makes small, safe updates to released production versions with emphasis on compatibility; and a development track that pursues more aggressive evolution. Maintenance releases (which should be considered production quality) have subversion numbers that run from 1 to 49, and development releases (which should be considered "alpha" quality) run from 50 to 99.

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


๐Ÿ’ฅ 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. If you have dynamically loaded extensions that you built under perl 5.003 or 5.004, you can continue to use 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.

๐Ÿ  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 in order to adapt them to your system.

๐Ÿช Perl Source Compatibility ๐Ÿช

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

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 user will 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, as 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.

๐Ÿ”’ Security fixes may affect compatibility ๐Ÿ”’

A few taint leaks and taint omissions have been corrected. This may lead to "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. ๐Ÿ˜ญ

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.

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

okay so Perl now contains its own highly optimized qsort() routine. that's right, it brought its own. and the new qsort() is resistant to inconsistent comparison functions, which means Perl's sort() will not provoke coredumps anymore when you feed it poorly written sort subroutines. (some C library qsort()s that were being used before used to have this problem, bless their hearts.) and in their testing, the new qsort() required the minimal number of pair-wise compares on average, among all known qsort() implementations. ate and left no crumbs fr fr.

See "perlfunc/sort".


๐Ÿ“ก Reliable signals

ngl, 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 energy.

BUT. one experimental implementation of reliable signals is available when threads are enabled. see "Thread::Signal". also see INSTALL for how to build a Perl 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 improve reliability of cached stack pointers in the internals and in XSUBs. iconic behavior honestly.


๐Ÿš— More generous treatment of carriage returns

Perl used to complain if it encountered literal carriage returns in scripts. now they are mostly treated like whitespace within program text. inside string literals and here documents, literal carriage returns are ignored if they occur paired with linefeeds, or get interpreted as whitespace if they stand alone. this behavior means that literal carriage returns in files should be avoided. ๐Ÿ™ˆ

you can get the older, more compatible (but less generous) behavior by defining the preprocessor symbol "PERL_STRICT_CR" when building perl. of course, all this has nothing whatever to do with how escapes like "\r" are handled within strings. different department, bestie.

note that this doesn't somehow magically allow you to keep all 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. ๐Ÿ’€

๐Ÿฉน Memory leaks

"substr", "pos" and "vec" don't leak memory anymore when used in lvalue context. and many small leaks that impacted applications that embed multiple interpreters have been fixed. glow up.


๐Ÿซถ Better support for multiple interpreters

the build-time option "-DMULTIPLICITY" has had many of the details reworked. some previously global variables that should have been per-interpreter now are. with care, this allows interpreters to call each other. see the "PerlInterp" extension on CPAN. ๐ŸŒˆ


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

See "Temporary Values via local()" in perlsub.


๐ŸŽ€ "%!" is transparently tied to the Errno module

See perlvar, and Errno.


โญ 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. so unserious of it before, but we move.


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

Barewords caused unintuitive behavior when a subroutine with the same name as a package happened to be defined. so like, "new Foo @args" โ€” 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". ๐Ÿ‘€

note that the method new() is called with a first argument of "Foo", not "Foo::" when you do that. important detail, don't skip it.

๐Ÿฆ‹ "exists $Foo::{Bar::}" tests existence of a package

it was impossible to test for the existence of a package without actually creating it before. now "exists $Foo::{Bar::}" can be used to test if the "Foo::Bar" namespace has been created. main character move.


๐ŸŒ Better locale support

See perllocale.


๐Ÿงฎ Experimental support for 64-bit platforms

Perl5 has always had 64-bit support on systems with 64-bit longs. starting with 5.005, the beginnings of experimental support for systems with 32-bit long and 64-bit 'long long' integers has been added. 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.

โš ๏ธ heads up though: 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. this option exists to allow people to work on those issues. it's a construction zone, not a finished build. ๐Ÿšง

๐Ÿ”ฌ 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. ๐Ÿ’…

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. so organized.


๐Ÿ”’ 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 "weak", i.e., any user-defined subroutine of the same name overrides it, unless a "use Thread" has been seen. so it knows its place, respectfully.


๐Ÿ” 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. consider this your notice.


๐Ÿงบ 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. multitasking queen.


โž– Negative LENGTH argument to splice

splice() with a negative LENGTH argument now work 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

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 would 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.


๐Ÿ“– <> 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. bookkeeping slay.

๐ŸŒฑ 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.

๐Ÿ”ง 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, this is the part where perl 5.005 just keeps handing you gifts. new modules, glow-ups to old faves, utility drama, doc drops โ€” all of it. let's go ๐Ÿฆ‹


โœจ New Modules โœจ

these are the fresh faces that showed up to the party:

  • B โ€” the Perl compiler and tools, fr. go read B for the deets.
  • Data::Dumper โ€” pretty-prints your Perl data like it's doing your nails ๐Ÿ’…. see Data::Dumper.
  • Dumpvalue โ€” dumps perl values straight to the screen. see Dumpvalue.
  • Errno โ€” look up errors the convenient way, no cap. see Errno.
  • File::Spec โ€” a portable API for file operations. cross-platform queen behavior.
  • ExtUtils::Installed โ€” query and manage your installed modules, like a little module librarian ๐Ÿ“š.
  • ExtUtils::Packlist โ€” manipulate .packlist files.
  • Fatal โ€” makes functions/builtins succeed or die. dramatic? yes. useful? also yes.
  • IPC::SysV โ€” constants and other support infrastructure for System V IPC operations in perl.
  • Test โ€” a framework for writing test suites. test your code, bestie, it's self-care ๐ŸŒธ.
  • Tie::Array โ€” base class for tied arrays.
  • Tie::Handle โ€” base class for tied handles.
  • Thread โ€” Perl thread creation, manipulation, and support. threads!! ๐Ÿงต
  • attrs โ€” set subroutine attributes.
  • fields โ€” compile-time class fields.
  • re โ€” various pragmata to control behavior of regular expressions. regex girlies rise ๐ŸŽ€.

๐ŸŒˆ Changes in existing modules ๐ŸŒˆ

the OGs got upgrades and honestly? they ate.

  • Benchmark โ€” you can now run tests for x seconds instead of guessing the right number of tests to run. and it keeps better time. so much better than vibing your way through a benchmark.
  • Carp โ€” Carp has a new function cluck(). cluck() warns, like carp(), but also adds a stack backtrace to the error message, like confess(). so you get the callout and the receipts ๐Ÿ”ฅ.
  • 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)). so they read and write now, main character energy ๐Ÿ‘‘.
  • Math::Trig โ€” a little bit of radial trigonometry (cylindrical and spherical) added, for example the great circle distance. math girlies, this one's for you.
  • 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. so yeah โ€” that whole mess? fixed ๐Ÿ’….

  • CPAN โ€” see perlmodinstall and CPAN.
  • Cwd โ€” Cwd::cwd is faster on most platforms. speed demon behavior โšก.

๐Ÿ› ๏ธ Utility Changes ๐Ÿ› ๏ธ

  • "h2ph" and related utilities have been vastly overhauled. glow-up fr.
  • "perlcc", a new experimental front end for the compiler is available. it's experimental, bestie, so treat it gently ๐Ÿ™ˆ.
  • The crude GNU "configure" emulator is now called "configure.gnu" to avoid trampling on "Configure" under case-insensitive filesystems. no more name collisions, we love to see it.
  • "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. so if you miss the old sluggish vibes, you can literally just ask for them back ๐Ÿซถ.

๐Ÿ“– Documentation Changes ๐Ÿ“–

the docs said "let me introduce myself" and honestly? iconic.

  • Config.pm now has a glossary of variables.
  • Porting/patching.pod has detailed instructions on how to create and submit patches for perl. contribute, bestie, it's giving community โœจ.
  • 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. watch your step ๐Ÿ’€.
  • perlopentut gives a tutorial on using open().
  • perlreftut gives a tutorial on references.
  • perlthrtut gives a tutorial on threads.

โœจ New Diagnostics โœจ

Like, all the new lil messages Perl might yell at you now ๐Ÿ’…

  • Ambiguous call resolved as CORE::%s(), qualify as such or use & โ€” (W) bestie you declared a subroutine with the same name as a Perl keyword, and then you used that name unqualified to call one or the other. Perl just went ahead and called the builtin, because your subroutine isn't imported. ๐Ÿ™ˆ If you wanna force it to be read 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 wanna silently have it mean the Perl operator, put the CORE:: prefix on the operator (like CORE::log($x)) or declare the subroutine to be an object method (check "attrs"). lowkey a whole vibe decision, pick wisely.
  • 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 must be at 1 or greater. See perlref. ๐Ÿซ 
  • Bareword "%s" refers to nonexistent package โ€” (W) you used a qualified bareword shaped like Foo::, but the compiler saw zero other uses of that namespace before that point. Do you maybe 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 is holding an undefined value. Something like this reproduces the whole thing:
$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. it's giving blocked.
  • 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 honestly? 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 shaped like CORE::word was given to prototype(), but there's no builtin with the name word. not me checking for something that doesn't exist ๐Ÿ™ˆ
  • Character class syntax [. .] is reserved for future extensions โ€” (W) inside regular expression character classes ([]), the syntax starting with [. and ending with .] is reserved for future extensions. If you genuinely need to represent those character sequences inside a regex character class, just quote the square brackets with the backslash: \[. and .\].
  • Character class syntax [: :] is reserved for future extensions โ€” (W) inside regular expression character classes ([]), the syntax starting with [: and ending with :] is reserved for future extensions. If you need to represent those character sequences inside a regex character class, just quote the square brackets with the backslash: \[: and :\].
  • Character class syntax [= =] is reserved for future extensions โ€” (W) inside regular expression character classes ([]), the syntax starting with [= and ending with =] is reserved for future extensions. If you need to represent those character sequences inside a regex character class, just quote the square brackets with the backslash: \[= and =\].
  • %s: Eval-group in insecure regular expression โ€” (F) Perl detected 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 regular expression 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 absolutely insist, you may still do this by explicitly building the pattern from an interpolated string at run time and using that in an eval(). See "(?{ code })" in perlre.
  • Explicit blessing to '' (assuming package main) โ€” (W) you're blessing a reference to a zero length string. This has the effect of blessing the reference into the package main, which is usually not what you want. Consider providing a default target package, e.g. bless($ref, $p || 'MyPackage'); ๐ŸŽ€
  • Illegal hex digit ignored โ€” (W) you may have tried to use a character other than 0 - 9 or A - F in a hexadecimal number. Interpretation of the hexadecimal number stopped before the illegal character.
  • No such array field โ€” (F) you tried to access an array as a hash, but the field name 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 the field name. The field names are looked up in the %FIELDS hash in the type package at compile time. The %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]. the way a single missing $ can end you ๐Ÿ˜ญ
  • Range iterator outside integer range โ€” (F) one (or both) of the numeric arguments to the range operator .. are outside the range which can be represented by integers 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 encountered while invoking a method. Probably indicates 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 meant to use parens. In any case, a hash requires 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 was assigned to a typeglob, a la *foo = undef. This does nothing. It's possible you really mean undef *foo. bestie that assignment is doing NOTHING for you ๐Ÿ’€
  • Use of reserved word "%s" is deprecated โ€” (D) the indicated bareword is a reserved word. Future versions of perl may use it as a keyword, so you're better off either explicitly quoting the word in a manner appropriate for its context of use, or using a different name altogether. The warning can be suppressed for subroutine names by either adding a & prefix, or using a package qualifier, e.g. &our(), or Foo::our().
  • perl: warning: Setting locale failed. โ€” (S) the whole warning message will look something like:
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 what were the failed locale settings varies. In the above, the settings were that the LC_ALL was "En_US" and the LANG had no value. This error means that Perl detected that you and/or your system administrator have set up the so-called variable system but Perl could not use those settings. This was not dead serious, fortunately: there's a "default locale" called "C" that Perl can and will use, and the script will be run. Before you really fix the problem, however, you will get the same error message each time you run Perl. How to really fix the problem can be found in "LOCALE PROBLEMS" in perllocale. ๐Ÿซถ


๐Ÿฆ‹ Obsolete Diagnostics ๐Ÿฆ‹

RIP to these, they're gone now, we don't miss them (jk we kinda do)

  • 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 this means that if the regular expression compiles to longer than 32767, it'll blow up. ๐Ÿ’ฅ Usually when you want a regular expression this big, there is a better way to do it with multiple statements. See perlre.

๐ŸŒˆ Configuration Changes ๐ŸŒˆ

You can use Configure -Uinstallusrbinperl which causes installperl to skip installing perl also as /usr/bin/perl. This is useful if you prefer not to modify /usr/bin for some reason or another but harmful because many scripts assume to find Perl in /usr/bin/perl. so like, pick your fighter ๐Ÿ‘‘


๐Ÿ› BUGS ๐Ÿ›

okay bestie, so if you think you found a bug, first thing: go peek at the headers of recently posted articles in the comp.lang.perl.misc newsgroup. might already be a whole thread about it. there might also be info at http://www.perl.com/perl/ โ€” that's the Perl Home Page, iconic resource, fr.

if you're convinced it's an unreported bug, pls run the perlbug program that comes with your release. and listen โ€” trim your bug down to a tiny but sufficient test case. like, tiny. but still enough to actually show the problem. the way that matters ๐Ÿ˜ญ

your bug report, plus the output of perl -V, gets sent off to <perlbug@perl.com> so the Perl porting team can analyse it. teamwork makes the dream work ๐Ÿซถ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • The Changes file โ€” for exhaustive details on what changed. exhaustive. every last crumb.
  • The INSTALL file โ€” for how to build Perl.
  • The README file โ€” for general stuff.
  • The Artistic and Copying files โ€” for copyright information.

๐Ÿ“œ 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>. they're literally asking, bestie, don't be shy.


and that's a wrap on PERL5005DELTA(1) ๐Ÿ’… this page is perl v5.42.3, dated 2026-08-03 โ€” go forth and perl, you absolute icon ๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from