pperl 0.6.5#

2026-07-23 to 2026-07-26, 16 commits.

JIT and parallelization#

  • next and last in compiled loops: a while loop whose body uses next, such as the statement parser of DBD::mysql, crashed the JIT compiler and left the JIT disabled for the rest of the run; such loops now compile, as do foreach loops with next. A last inside do {...} while leaves the enclosing loop, as in perl, where the compiled code ended only the do block.

Modules#

  • DBD::Pg and DBD::mysql are part of pperl, written in Perl over PostgreSQL’s libpq and the MySQL client library, so DBI->connect("dbi:Pg:...") and dbi:mysql: work with no driver to build. DBD::Pg takes ?, $1 and :name placeholders and binary bytea parameters ({pg_type => 17}) and reports the SQLSTATE; DBD::mysql fetches binary data intact. Both are tested against live PostgreSQL and MariaDB servers.

  • DBD::Sybase is included, written in Perl over FreeTDS’s ct-lib: it connects by server name or by host= and port=, runs queries with ? placeholders and transactions, and reports errors through err, errstr and state. It has not yet been tested against a live server.

  • Peta::FFI 0.02 passes C pointers as opaque values (signature type o, with undef as NULL) and reads, writes, allocates and frees C memory with peek, peek_cstr, poke, alloc, free, pack_ptr and unpack_ptr. That is enough to drive a C library such as SQLite from pure Perl.

  • DBI: in a pperl built without database support, use DBI stops with a message naming the missing capability instead of loading the host perl’s DBI and failing inside XSLoader.

  • Magical arguments to native modules are read correctly: md5_hex($1), sha1_hex(substr(...)), encode_base64(substr(...)) and $md5->add(substr($d, $o, $n)) all processed an empty string.

  • Default imports: use Socket; imports Socket’s default list again, and File::Path no longer dies calling getcwd; eleven native modules had an import that did nothing. A native module’s own import is no longer replaced by the generic one.

  • Time::HiRes: importing stat, sleep or time from Time::HiRes overrides the builtin only in the importing package, as on perl5. It overrode it for the whole program, which broke stat(_) everywhere else; File::Copy imports it, and require CPAN died with Bareword "_" not allowed while "strict subs" in use.

  • File::Temp exports what perl5’s does, with the :POSIX, :mktemp and :seekable tags and the STANDARD, MEDIUM, HIGH and SEEK_* constants, and its objects can seek. tempfile() without DIR creates the file in the current directory instead of dying, and a forked child that exits no longer removes the parent’s temporary files.

  • Storable keeps booleans: a boolean value (perl 5.36 and later) comes back from freeze and thaw or dclone as a boolean.

  • Opcode is native, providing the operator masks that Safe compartments are built from.

  • IPC::SysV is native: its constants, ftok, shmat, shmdt, memread and memwrite, and what the stat methods of IPC::Msg, IPC::Semaphore and IPC::SharedMem need.

  • Warnings when loading modules: loading re, mro, version, Encode, Math::GMP, Config, attributes or Time::HiRes no longer warns that a subroutine was redefined, and use Config, B, Storable and PerlIO::encoding no longer cause “used only once: possible typo” warnings that perl5 does not give. version objects use perl’s built-in implementation for all their methods, as on perl5, instead of a mix of two.

  • Scalar::Util: readonly returns the same value as on perl5, the flag word (such as 134283264) rather than 1. readonly, tainted and dualvar are faster; a benchmark of readonly went from 0.66 to about 0.95 times perl5’s speed.

  • Config: $Config::VERSION is set and equals $], as on perl5, and the d_pw* keys that User::pwent requires are present, so User::pwent loads.

  • POSIX: strtol and strtoul with one argument use base 0 instead of warning Argument "*main::strtol" isn't numeric, and POSIX::sprintf no longer warns “Use of uninitialized value in subroutine entry”.

Command line#

  • The daemon: pperl --daemon runs a background daemon that holds a ready interpreter (--daemon=start, stop and status manage it), and pperl --via-daemon script.pl or PPERL_DAEMON=1 runs a script in a process forked from it, with the caller’s standard streams and working directory. When no daemon answers, the script runs normally. --build-id prints the binary identity the daemon is keyed on. On its own this measured about 0.6 ms slower than a normal start, so it is opt-in.

Documentation#

  • Translations: the “Graphics with Perl” guide is translated into the remaining 31 languages and so into all 41. In the Arabic, Persian and Hebrew translations, 72 arrows that pointed the wrong way are corrected.

  • Daemon guide: a new chapter of the performance guide, “Fast start-up: the daemon”, describes the daemon, in English and in all 41 translations.

  • perl 5.44 in the documentation: the introduction, the page of differences from Perl 5, the coming-from guides, the errata and the perlfunc pages state compatibility with perl 5.44 instead of 5.42.

  • Getting started and errata: Getting started lists -E, -I and -V, drops --cache, and describes the module search path as it behaves: -I works alongside PERL5LIB and PPERL5LIB. The errata page on identifier length gives perl 5.44’s limit of 1019 bytes, which pperl matches, and withdraws the claim that pperl differs above 251 bytes.