pperl 0.5.6#

2026-04-18 to 2026-07-08, 226 commits.

Language and runtime#

  • Exit status: pperl exits with the status the program ends with, wrapped to 8 bits as in perl5. It exited with 0 whatever the program did, so exit 3 or an uncaught die reported success to the shell, and a parent’s $? read 0 for such a child.

  • Taint mode: -T turns on taint mode and -t its warn-only form, as in perl5; both switches were ignored, and -t switched on pperl’s execution tracing, which is now --trace. Scalar::Util’s tainted reports whether a value is tainted, where it always returned false.

  • Experimental warnings: no warnings 'experimental::class' silences the warnings that class, field and method raise, as in perl5; they were printed regardless.

Modules#

  • Cairo is native: use Cairo provides the interface of the CPAN Cairo module 1.109 over the system’s libcairo, with no distribution to install and nothing to compile. Contexts, surfaces, patterns, matrices, fonts, regions and paths are covered, including the PNG, PDF, PostScript and SVG stream callbacks, MIME data, the tied Cairo::Path view and glyph arrays. Cairo::FtFontFace->create is not available, because it needs Font::FreeType.

  • File::Map 0.71 is native: map_file, map_handle, map_anonymous, sys_map, remap, protect, sync, advise and unmap map files and anonymous memory into Perl strings.

  • Startup no longer sets up every native module: a native module is set up when the program first loads it. Setting all of them up took about 8 ms on every run, loaded libgmp, libreadline and three other libraries, and left modules the program never asked for in %INC.

  • PDL: matmult no longer reads memory it has already freed, interpol takes its arguments in upstream’s order, and lgamma in scalar context returns the logarithm instead of the sign. at on an empty or null ndarray croaks “Position out of range” instead of returning undef, and arithmetic between a float ndarray and a fractional number gives a double result, as upstream. setvaltobad and setbadtonan work, inplace included, where they croaked.

  • PDL input and output: ndarrays can be stored and retrieved with Storable through PDL::IO::Storable, dclone included. PDL::IO::FlexRaw no longer dies with “Operation ‘!=’: no method found”, mapfraw maps a file into an ndarray through File::Map, and hdr creates an empty header hash on first use, as upstream.

  • Storable: dclone copies through an object’s STORABLE_freeze and STORABLE_thaw hooks, as perl5’s does, and an object frozen by a hook is thawed into a scalar or an array again, where it always came back as a hash.

  • File::Glob: bsd_glob and csh_glob no longer corrupt memory and crash when a pattern matches more than about 128 names. bsd_glob sorts case-insensitively by default, as in perl5, and loading File::Glob no longer warns that import was redefined or that DEFAULT_FLAGS was used only once.

  • Long result lists: List::Util’s zip, mesh and unpairs and their variants, Hash::Util’s legal_keys, hidden_keys, bucket_info and bucket_stats, re::regnames, Data::Dumper and PDL’s list no longer corrupt memory when they return more than about 128 values.

  • Imported functions: a function imported from a native module, such as List::Util’s first in first { ... } @list, no longer draws a “used only once: possible typo” warning.

  • File::Temp: files and directories created with CLEANUP => 1 are removed when the program ends; every such program left an empty directory behind in the temporary directory.

  • POSIX and Socket: use POSIX ':sys_wait_h', ':errno_h' and POSIX’s other export tags import their names, where only importing the names one by one worked, and Socket exports SOMAXCONN.

Command line#

  • One-liner switches: -n, -p, -a, -F, -l, -0 and -i work as in perl5, where pperl rejected them; -l and -0 take an optional octal value and -i edits files in place. pperl’s interactive shell, which -i used to start, is reached with --interactive only.

Documentation#

  • Documentation site: the documentation moved to a new site with a PDF edition, a language picker, a license page, a page of command-line options taken from pperl --help, a glossary and an index. Every page links to its Markdown source, in the reader’s language on translated pages. The module reference pages were rewritten from implementation notes into descriptions for Perl programmers.

  • Language reference: every built-in function has its own page, 234 in all, indexed alphabetically and by category. perlop, perlvar, perldata and perlsub are split into topic pages, such as the operator families and the groups of special variables, and perldiag (the diagnostics pperl emits), perllocale, perlsec and a page on BEGIN, END and the other phase blocks are new. An errata chapter records where perl’s own documentation is wrong or stale.

  • Guides and tutorials: new guides cover regular expressions in twelve chapters, among them a comparison with PCRE2, POSIX and RE2 syntax, as well as object-oriented Perl, debugging, concurrent execution, performance, writing tie classes, pperl’s architecture and Perl one-liners. New tutorials cover pack and unpack, I/O streams, references, Unicode with a collection of recipes, boolean logic and interprocess communication.

  • Coming from other languages: a new series teaches Perl by comparison with Python, PHP, Ruby, Lua, sed, awk, the shell and Tcl, with every Perl example run on pperl.

  • Graphics guide: “Graphics with Perl” covers 2D graphics in twelve chapters: raster and vector foundations and the classic drawing algorithms in plain Perl, the toolkits from Imager, GD and ImageMagick to Cairo, SVG, charts and GUI toolkits, binding a C library through Peta::FFI with Cairo as the example, and two Prima projects, a drawing program and a 2D game.

  • Translations: the documentation is translated into 41 languages, among them German, French, Spanish, Chinese, Japanese, Russian, Arabic and Hebrew, and right-to-left languages are laid out right to left. perlop, perlvar, perldata, perlsub, perldiag and the “Coming from” series are translated completely in all 41; text not yet translated reads in English. The language picker shows how much of each language is translated.