BATsh
view release on metacpan or search on metacpan
- NEW PREDICATES (t/lib/BATsh_TestOS.pm): have_symlink() (asks
whether a link can actually be made in a given directory, since
Win32 perl has had the function since 5.16 but fails without the
privilege), writable_dir() (-w reports the read-only attribute on
Win32 and says nothing about the ACL that decides), and
path_shape() (names the properties of a pathname that have changed
behaviour, for the fingerprint).
- xt/win32_matrix.pl gains the environment axis, and it is now the
DEFAULT: every cell runs with PERL5LIB, PERL5OPT, PERLIO,
PERL_UNICODE, the HARNESS_ variables and the locale variables
removed, with AUTOMATED_TESTING, NONINTERACTIVE_TESTING and
PERL_MM_USE_DEFAULT set, and with standard input taken from the
null device. A cell that inherits the author's environment
reproduces the one machine already known to pass; reproducing the
smoker is the point. --env=inherited or --env=both widens it back
when the question is whether something works interactively.
- BUILD (pmake.bat 0.47 -> 0.48): test-phase prerequisites are now
collected from t/*.t, t/lib/*.pm and test.pl and reported under
build_requires in META.yml and under the test phase in META.json.
available in this environment): BATsh::SH::_bg_launch_decoded()
uses system(1, $cmdline) (P_NOWAIT) to background a job on
Win32; the success/failure check (defined $pid && $pid > 0)
matches the documented Win32 system(1, ...) contract (PID on
success, 0 on failure). t/0016's _run_child() LIST-form
system($^X, "-I$lib", $pm, $prog, @args) calls CreateProcess
directly and does not re-enter cmd.exe, so the original
quote-re-wrapping failure mode cannot recur. _bg_tempfile()'s
temp-directory selection already accounts for %TEMP%/%TMP% and
backslash path separators. No logic defects found in review;
confirmation on an actual Windows host (locale, path-length,
%TEMP% permission variables that cannot be reviewed statically)
remains pending.
- CP932 (Shift_JIS) multibyte-safe execution: NEW MODULE BATsh::MB.
A .batsh script written in CP932 -- the encoding of Japanese
Windows -- now runs correctly even when its characters contain
trail bytes that collide with ASCII shell metacharacters (the
classic "dame-moji" / 0x5C problem). Affected characters are
extremely common: SO (0x835C), HYOU (0x955C), NOH (0x945C) end
in a backslash; PO (0x837C) in a pipe; CHI (0x8360) in a
NS04/NS05 cover nested $() with a pipeline at each level (defects 2
and 3); NS06 checks that two sibling $() pipelines on one line do
not collide; NS07 covers an assignment from a nested pipeline
substitution and its reuse. Like t/0006/0007 it prepends the running
interpreter's directory to PATH so the bareword "perl" resolves on a
smoker. Added to MANIFEST.
- eg/05_cmd_comprehensive.batsh: the SET/IF demonstration variable was
renamed LANG -> GREETING. As LANG, the example exported LANG=BATsh
into %ENV, and the external "perl" it later spawns then emitted a
glibc "Setting locale failed ... LANG = BATsh" warning to STDERR on
Unix (harmless, and invisible during "make test" because
t/9070-examples.t captures and discards child STDERR, but visible
when the example is run by hand; Windows perl does not warn). The
rename keeps the example's behaviour identical and silences the
Unix-only noise.
- eg/00_hello.pl: normalised from a CRLF line ending to LF, matching
the rest of eg/ (the other examples are already LF). Perl tolerates
the trailing CR on Unix, so this is a cosmetic consistency fix.
( run in 0.819 second using v1.01-cache-2.11-cpan-a5162978ef8 )