====
***** Changes to make Perl 5.000:
* NOTE: with Perl 5, the following trick to encapsulate Perl inside .BAT
files no longer work:
perl -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
';
# Insert your perl script here. Your perl script goes here, and only
# here.
__END__
:endofperl
form instead:
perl -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
#! /usr/bin/perl
# The previous comment is REQUIRED! This comment, and the following
# ones, can be deleted.
# Insert your perl script here. Your perl script goes here, and only
# here.
__END__
:endofperl
Note that the above DEPENDS on having a line that begins with "#!" and
contains "perl".
* The a2p and s2p programs have been ported. Check out the "x2p"
subdirectory. The "s2p" program is really "s2p.bat"; however, in
order for this to work, perl.exe, dos4gw.exe, and perlcpp.exe must
have been properly installed (be somewhere in %PATH). Both a2p.exe
and s2p.bat produce MSDOS batch file syntax; the output can be
placed directly into a .BAT file and immediately executed as such.
This means that the output will have to be edited if you want to use
it on some other platform, like Unix. Doing this is simple: a few
lines at the beginning and end of the .BAT file need to be deleted.
* Note that the output of s2p.bat is completely unindented. This is a
side-effect of the simple C preprocessor used ("perlcpp.exe"), which
is based upon the very ancient DECUS C preprocessor, and which deletes
leading whitespace on a line. If you don't like this, edit the code
using Emacs' perl-mode, and use the indent-region feature.
* While a perlcpp.exe exists, perl's -P option has not (yet?) been
implemented.
* MSDOS Perl now verifies that "TMP", "TEMP", or "TEMPDIR" contains a
valid directory before using it. However, no check is made to verify
that files can actually be created in the directory (e.g., the
directory may be on a read-only network drive). If none of these
variables are set, or none contain a valid/existing directory name,
the root directory of the current drive will be used (actually, the
current drive *WHEN* the first temp file is created will be used --
this is an important distinction for those programs that switch
between drives). Once a directory is chosen, that directory will
continue to be used until perl terminates.
* When executing files via system() or pipes opened via open(), any
forward slashes ("/") in the executable program name are changed to
backslashes. You can now use statements like:
open(IN, "./perl /a/b/fooscr |");
This gets changed internally to:
open(IN, ".\perl /a/b/fooscr |");
Before, this would not work because MSDOS tried to execute the command
"." with the option "/perl".
* Extra periods (".") in a filename are changed to underscores ("_"), to
make it slightly easier to port Unix perl scripts (however, this can
cause other problems). This allows the use of filenames such as
"a.b.c.d", which gets translated into "a_b_c.d". However, note that
this translation is done ONLY to files accessed directly by perl (via
stat() or open()); NOTHING is done to filenames used in, for example:
open(IN, "cat a.b.c.d|");
system("type a.b.c.d");
system("mycmd > a.b.c.d");
Also, the translation is done only for the actual BASE filename. Any
directory specification up to the base file name is NOT translated.
Repeat: directory names are *NOT* translated. For example, the
following names get properly translated:
This name Becomes
----------------- -----------------
/a/b/c/d/e.f.g.h /a/b/c/d/e_f_g.h
/a/b/c.d/e.f.g.h /a/b/c.d/e_f_g.h
/a/b/c.d/.e.f /a/b/c.d/_e.f
But these do not:
This name Becomes (illegal)
----------------- -------------------------
/a.b/.c.d/.e.f /a.b/.c.d/_e.f
/a.b.c.d/e.f.g /a.b.c.d/e_f.g
* The filename "/dev/null" is now auto-translated into "nul", the MSDOS
equivalent of the null device.
* Berkeley db now works properly. A bug in lseek() was found, reported,
and worked around. Berkeley db 1.85 is now being used. GDBM has been
drop-kicked.
* The perlglob.exe program is now compiled using the 16-bit WATCOM
compiler. Borland compilers are now superfluous. The compact memory
model (64K code, >64K data) is still being used, to handle large
directories.
* The default location for the perl library support files is
"c:\perl5\lib". This can be changed through the use of the PERLLIB
environment variable, or by recompiling perl.
* Locations of MSDOS files were shuffled around in possible anticipation
of possible multi-platform compiles (e.g., MSDOS, Windows, Windows NT,
etc.).
* The perl documentation can be found as "pod" ("plain old
documentation") files in the "pod" subdirectory.
* Fixed bug where pipes in subroutines didn't work. For example, this
failed:
open(PIPE, "| myprog");
* An old version of the DOS/4GW extender is being used, because of
suspected bugs in newer versions of the extender.
* The "makeperl.bat" batch file is no longer needed to compile Perl.
All flags are now set by the Makefile.