BATsh
view release on metacpan or search on metacpan
reason instead of relying on the shell to fail for the right reason.
- NEW FILE xt/win32_matrix.pl: a maintainer tool that runs the suite
from one Windows box over the environments the smokers actually
differ in -- five shapes of $HOME (backslash, forward slash,
trailing separator, embedded space, and not set at all), a working
directory on the same drive as $HOME and on another one (Windows
keeps a current directory per drive), ANSI code page 932 and 65001,
and any number of perls given with --perl=. Each of the Windows
FAILs this distribution has received would have been visible here
before upload. It is not part of "make test" and no installer or
smoker runs it.
- DOC FIX (lib/BATsh.pm, README): the SYNOPSIS and the description of
BATsh->main() both stated that bin/batsh.pl "is installed as batsh".
That holds only on Windows, where MakeMaker runs pl2bat over the
installed script; EXE_FILES keeps the basename otherwise, so a Unix
install puts it in the path as batsh.pl. Confirmed with a DESTDIR
install. Both places now read "installed as batsh.pl; on Windows
MakeMaker's pl2bat also provides batsh", and the command-line
examples in the SYNOPSIS use the name that actually exists.
elsewhere, so it is precisely what goes stale unnoticed. B8 requires
every shipped Perl source carrying the heading -- lib/*.pm and the
bin/*.pl installed as EXE_FILES -- to state the distribution version
under it. It is one check for the distribution, so check_B goes from
six per module plus one to six per module plus two.
- bin/batsh.pl: gains the =head1 VERSION section the five modules
already carry, so the installed launcher documents which release it
belongs to. B8 above keeps it from drifting.
- Changes: this entry is dated 2026-08-01 JST, the day of the upload.
0.09 2026-07-27 JST (Japan Standard Time)
- FIX (SH, Windows): the result of an expansion is literal data, not
shell source. A line is expanded first and has its quotes removed
afterwards, and the quote-removal stage could not tell text written
in the script from text an expansion had just produced: every
backslash coming out of a variable, a command substitution or a
tilde expansion was re-read as a shell escape and deleted. With
open(FH_TAR, ">$tardir.tar") || die "Can't open file: $tardir.tar\n"; #'
binmode FH_TAR;
for my $file (@file) {
if (-e $file) {
mkpath(dirname("$tardir/$file"), 0, 0777);
print STDERR "copy $file $tardir/$file\n";
copy($file, "$tardir/$file");
#-----------------------------------------------------------------------------
# Sunday December 21, 2008 07:38 PM
# Fixing world writable files in tarball before upload to CPAN [ #38127 ]
# http://use.perl.org/~bart/journal/38127 (dead link)
# Fix CPAN uploads for world writable files
# http://perlmonks.org/index.pl?node_id=731935
#-----------------------------------------------------------------------------
# $tar->add_files("$tardir/$file");
#-----------------------------------------------------------------------------
open(FH, $file) || die "Can't open file: $file\n"; #'
binmode FH;
local $/ = undef; # slurp mode
my $data = <FH>;
close FH;
xt/win32_matrix.pl view on Meta::CPAN
# ANSI code page 932 (Japanese) or 65001 (UTF-8), which decides
# whether a CP932 file name can exist at all
# perl 5.005_03 ... 5.42; the smokers have sent
# 5.8.9, 5.18.4 and 5.42.0 so far
# the environment a smoker has no PERL5LIB, no PERL5OPT, no
# PERLIO or PERL_UNICODE, no interactive STDIN,
# and AUTOMATED_TESTING set; the author's shell
# has the opposite of all of that
#
# Each of the three t/0020 failures, and the t/0015 and t/0019 ones,
# would have been caught here before upload. See rule R5 in
# t/lib/BATsh_TestOS.pm.
#
# The environment axis is rule R6, and it is why every cell runs in a
# SCRUBBED environment by default rather than in the author's. A cell
# that inherits the author's %ENV reproduces the author's box, which
# is the one machine already known to pass; reproducing the smoker is
# the entire point. --env=inherited or --env=both widens it back when
# the question is specifically whether something works interactively.
#
# USAGE
( run in 1.875 second using v1.01-cache-2.11-cpan-b16cb0d3907 )