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 3or an uncaughtdiereported success to the shell, and a parent’s$?read 0 for such a child.Taint mode:
-Tturns on taint mode and-tits warn-only form, as in perl5; both switches were ignored, and-tswitched on pperl’s execution tracing, which is now--trace. Scalar::Util’staintedreports whether a value is tainted, where it always returned false.Experimental warnings:
no warnings 'experimental::class'silences the warnings thatclass,fieldandmethodraise, as in perl5; they were printed regardless.
Modules#
Cairo is native:
use Cairoprovides 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 tiedCairo::Pathview and glyph arrays.Cairo::FtFontFace->createis not available, because it needs Font::FreeType.File::Map 0.71 is native:
map_file,map_handle,map_anonymous,sys_map,remap,protect,sync,adviseandunmapmap 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:
matmultno longer reads memory it has already freed,interpoltakes its arguments in upstream’s order, andlgammain scalar context returns the logarithm instead of the sign.aton 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.setvaltobadandsetbadtonanwork,inplaceincluded, where they croaked.PDL input and output: ndarrays can be stored and retrieved with Storable through PDL::IO::Storable,
dcloneincluded. PDL::IO::FlexRaw no longer dies with “Operation ‘!=’: no method found”,mapfrawmaps a file into an ndarray through File::Map, andhdrcreates an empty header hash on first use, as upstream.Storable:
dclonecopies through an object’sSTORABLE_freezeandSTORABLE_thawhooks, 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_globandcsh_globno longer corrupt memory and crash when a pattern matches more than about 128 names.bsd_globsorts case-insensitively by default, as in perl5, and loading File::Glob no longer warns thatimportwas redefined or thatDEFAULT_FLAGSwas used only once.Long result lists: List::Util’s
zip,meshandunpairsand their variants, Hash::Util’slegal_keys,hidden_keys,bucket_infoandbucket_stats,re::regnames, Data::Dumper and PDL’slistno 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
firstinfirst { ... } @list, no longer draws a “used only once: possible typo” warning.File::Temp: files and directories created with
CLEANUP => 1are 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 exportsSOMAXCONN.
Command line#
One-liner switches:
-n,-p,-a,-F,-l,-0and-iwork as in perl5, where pperl rejected them;-land-0take an optional octal value and-iedits files in place. pperl’s interactive shell, which-iused to start, is reached with--interactiveonly.
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,ENDand 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
packandunpack, 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.