PERL5005DELTA(1perl)
๐ 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 likesv_undefandna(which should now be written asPL_sv_undef,PL_naetc.).
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
dTHRmacro to initialize the handle to access per-thread data. If you see a compiler error that talks about the variablethrnot being declared (when building a module that has XS code), you need to adddTHR;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::Lintis an experimental module to detect and warn about suspicious code, especially the cases that the-wswitch does not detect.B::Deparsecan be used to demystify perl code, and understand how perl optimizes certain constructs.B::Xrefgenerates cross reference reports of all definition and use of variables, subroutines and formats in a program.B::Showlexshow the lexical variables used by a subroutine or file at a glance.perlccis 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 symbolPERL_STRICT_CRwhen building perl. and ofc all of this has literally nothing whatsoever to do with how escapes like\rare 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 methodnew()is called with a first argument ofFoo, notFoo::, 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 asperldoson 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 asperlos390on 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, akaperlwin32. - VMS configuration system has been rewritten ๐ See
README.vms(installed asREADME_vmson 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. SeeB. ๐Data::Dumperโ A module to pretty print Perl data. SeeData::Dumper. โจDumpvalueโ A module to dump perl values to the screen. SeeDumpvalue. ๐ซถErrnoโ A module to look up errors more conveniently. SeeErrno. ๐File::Specโ A portable API for file operations. ๐ExtUtils::Installedโ Query and manage installed modules. ๐ฆExtUtils::Packlistโ Manipulate.packlistfiles. ๐ธ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 forxseconds instead of guessing the right number of tests to run.
Keeps better time. โฐ
CarpโCarphas a new functioncluck().cluck()warns, likecarp(), but also adds a stack backtrace to the error message, likeconfess(). ๐ฆCGIโCGIhas been updated to version2.42. ๐Fcntlโ MoreFcntlconstants added:F_SETLK64,F_SETLKW64,O_LARGEFILEfor 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 flagsF_FLOCK,F_POSIX, LinuxF_SHLCK, andO_ACCMODE: the mask ofO_RDONLY,O_WRONLY, andO_RDWR. ๐Math::Complexโ The accessors methodsRe,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โPOSIXnow has its own platform-specific hints files. ๐งDB_FileโDB_Filesupports version2.xof Berkeley DB. See"ext/DB_File/Changes". ๐๏ธMakeMakerโMakeMakernow supports writing empty makefiles, provides a way to specify that siteumask()policy should be honored. There is also better support for manipulation of.packlistfiles, 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โ SeeperlmodinstallandCPAN. ๐ฆCwdโCwd::cwdis 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.pmnow has a glossary of variables. ๐Porting/patching.podhas detailed instructions on how to create and submit patches for perl. ๐ฉทperlportspecifies guidelines on how to write portably. ๐perlmodinstalldescribes how to fetch and install modules from"CPAN"sites. ๐๏ธ- Some more Perl traps are documented now. See
perltrap. ๐ชค perlopentutgives a tutorial on usingopen(). ๐ชperlreftutgives a tutorial on references. ๐perlthrtutgives 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
Changesfile โ exhaustive deets on what changed. all of it. every crumb. ๐ - The
INSTALLfile โ how to build Perl, step by step. - The
READMEfile โ general stuff, the chill overview vibes. - The
ArtisticandCopyingfiles โ 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