NAME
Proc::ShellSpawn::Programs - echo, printf, test and [ as GNU coreutils 9.4 does them, inside the Perl process (EXPERIMENTAL)
SYNOPSIS
my ($out, $err, $status) = Proc::ShellSpawn::Programs::printf(['printf', '%s|%5.2f\n', 'x', 3.14159], { LC_ALL => 'C' });
DESCRIPTION
echo, printf, test (also for [), true and false take (\@ARGV, \%ENV, \%OPT) and return (STDOUT, STDERR, STATUS); printf also returns, fourth, the same text as [FD, TEXT] pieces in the order coreutils writes them. ARGV->[0] is the name as written (messages use it). ENV gives POSIXLY_CORRECT (echo) and the locale (LC_ALL, LC_CTYPE, LC_MESSAGES, LANG: UTF-8 or not, for quotes and %q). OPT: cwd (test's relative file names), isatty (a code ref for test -t FD), echo (whose echo: coreutils, the default, which heeds POSIXLY_CORRECT; dash or bash, their builtins as dash 0.5.12 and bash 5.2.21 do them, which do not).
Proc::ShellSpawn runs them in place of the programs (by default; see PROC_SHELLSPAWN_INPROC there; PROC_SHELLSPAWN_ECHO gives OPT's echo, and $Proc::ShellSpawn::ECHO holds it). The known differences from coreutils 9.4 are listed as X21 in doc/pspawn-known-issues.md.