| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
p4raw-id: //depot/perl@3774
|
|
|
| |
p4raw-id: //depot/perl@3755
|
|
|
|
|
|
|
|
| |
directory possible. These should get us as far
as miniperl, then building DynaLoader falls into
tiny twinkling pieces as MakeMaker knows nothing
of VPATH mindset.
p4raw-id: //depot/cfgperl@3735
|
|
|
|
|
| |
Message-Id: <tqd879vf4z.fsf@puma.genscan.com>
p4raw-id: //depot/perl@2161
|
|
|
|
|
| |
p4raw-link: @1964 on //depot/confperl: 2d85315bb227e0962a693eaaadc3f40ca2fbf49b
p4raw-id: //depot/cfgperl@1971
|
|
|
|
|
| |
conflicting malloc() declarations everywhere
p4raw-id: //depot/perl@1884
|
|
|
|
|
| |
pattern match...
p4raw-id: //depot/ansiperl@1571
|
|
|
|
|
|
| |
Message-Id: <199807132025.XAA10771@alpha.hut.fi>
Subject: Configure patches for MVS (and one x2p/Makefile.SH)
p4raw-id: //depot/perl@1476
|
|
|
|
|
|
| |
Message-Id: <199807111451.RAA27010@alpha.hut.fi>
Subject: M3 "generic" parts
p4raw-id: //depot/perl@1451
|
|
|
|
|
| |
Message-Id: <20430.9807101619@tempest.cise.npl.co.uk>
p4raw-id: //depot/perl@1426
|
|
|
| |
p4raw-id: //depot/perl@963
|
|
|
| |
p4raw-id: //depot/perl@575
|
|\
| |
| | |
p4raw-id: //depot/perl@137
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[editor's note: this one imported like a charm!]
TESTS -
Subject: Improve pragma/locale test 102 - and don't fail, just warn
From: Jarkko Hietaniemi <jhi@anna.in-berlin.de>
Files: t/pragma/locale.t
Subject: Invalid test output in t/op/taint.t in trial 1
From: Dan Sugalski <sugalsd@lbcc.cc.or.us>
Files: t/op/taint.t
t/op/taint.t prints out invalid ok messages for tests it skips.
Rather than printing "ok 136" it prints "136 ok".
p5p-msgid: 3.0.3.32.19970919160918.00857a50@stargate.lbcc.cc.or.us
UTILITIES -
Subject: Perldoc tiny patch to avoid $0
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Files: utils/perldoc.PL
Msg-ID: 199709122141.RAA16846@monk.mps.ohio-state.edu
(applied based on p5p patch as commit 0b166b6635cf199f072db516b2a523ee659394d5)
Subject: h2ph broken in 5.004_02
From: David Mazieres <dm@reeducation-labor.lcs.mit.edu>
Files: utils/h2ph.PL
Msg-ID: 199708201700.KAA02621@www.chapin.edu
(applied based on p5p patch as commit 4a8e146e38ec2045f1f817a7cb578e1b1f80f39f)
Subject: add key_t caddr_t to h2ph
From: Tony Sanders <sanders@bsdi.com>
Files: eg/sysvipc/ipcsem utils/h2ph.PL
Msg-ID: 199708272301.RAA12803@austin.bsdi.com
(applied based on p5p patch as commit 0806a92ffc3a74ca70aa81051cdf2a306cd0a8af)
Subject: perldoc search ., lib and blib/* if -f 'Makefile.PL'
From: Tim Bunce <Tim.Bunce@ig.co.uk>
Files: utils/perldoc.PL
Subject: perldoc finds wrong pod2man
(from perldoc source)
# We must look both in @INC for library modules and in PATH
# for executables, like h2xs or perldoc itself.
Unfortunately, searching PATH for installed perl executables like
pod2man is INCORRECT. perldoc should start by searching the
directory it was executed from, which might not be in the PATH
at all.
Credited: Joseph "Moof-in'" Hall <joseph@cscaper.com>
p5p-msgid: 199708251732.KAA19299@gadget.cscaper.com
Subject: 5.004m4t1: perlbug: NIS domainname gets into wrong places
From: Andreas J. Koenig <koenig@anna.mind.de>
Files: utils/perlbug.PL
Msg-ID: sfcg1qy38as.fsf@anna.in-berlin.de
(applied based on p5p patch as commit 41f926b844140b7f7eaa9302113e45df3a9f9ff4)
Subject: add better local patch info to perlbug
From: Tim Bunce <Tim.Bunce@ig.co.uk>
Files: utils/perlbug.PL
Subject: perldoc - suggest modules if requested module not found
From: Anthony David <adavid@netinfo.com.au>
Files: utils/perldoc.PL
private-msgid: 3439CD83.6969@netinfo.com.au
Subject: perldoc mail::foo tries to read binary /usr/ucb/mail
From: Tim Bunce <Tim.Bunce@ig.co.uk>
Files: utils/perldoc.PL
Subject: perldoc weirdness
perldoc mail::imap yields:
{joseph}:79% perldoc mail::foo
can't open /usr/ucb/mail: Permission denied at ./pod2man line 362.
Credited: Joseph "Moof-in'" Hall <joseph@cscaper.com>
p5p-msgid: 199710082014.NAA00808@gadget.cscaper.com
Subject: perldoc -f setpwent (for example) returns no descriptive text
From: Tim Bunce <Tim.Bunce@ig.co.uk>
Files: utils/perldoc.PL
Subject: perldoc diffs: don't search auto - much faster
From: "Joseph N. Hall" <joseph@5sigma.com>
Files: utils/perldoc.PL
Msg-ID: MailDrop1.2d7dPPC.971012211957@screechy.cscaper.com
(applied based on p5p patch as commit 62b753c6ae4ab9bf22fbb6ec7ceac820bcef8fe4)
|
|/
|
|
|
| |
MUTEX_* stuff when malloc.c gets copied to x2p/malloc.c.
p4raw-id: //depot/perl@61
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CORE LANGUAGE CHANGES
Subject: Bitwise op sign rationalization
From: Chip Salzenberg <chip@atlantic.net>
Files: op.c opcode.pl pod/perlop.pod pod/perltoc.pod pp.c pp.h pp_hot.c proto.h sv.c t/op/bop.t
Make bitwise ops result in unsigned values, unless C<use
integer> is in effect. Includes initial support for UVs.
Subject: Defined scoping for C<my> in control structures
From: Chip Salzenberg <chip@atlantic.net>
Files: op.c perly.c perly.c.diff perly.h perly.y proto.h toke.c
Finally defines semantics of "my" in control expressions,
like the condition of "if" and "while". In all cases, scope
of a "my" var extends to the end of the entire control
structure. Also adds new construct "for my", which
automatically declares the control variable "my" and limits
its scope to the loop.
Subject: Fix ++/-- after int conversion (e.g. 'printf "%d"')
From: Chip Salzenberg <chip@atlantic.net>
Files: pp.c pp_hot.c sv.c
This patch makes Perl correctly ignore SvIVX() if either
NOK or POK is true, since SvIVX() may be a truncated or
overflowed version of the real value.
Subject: Make code match Camel II re: functions that use $_
From: Paul Marquess <pmarquess@bfsec.bt.co.uk>
Files: opcode.pl
Subject: Provide scalar context on left side of "->"
From: Chip Salzenberg <chip@atlantic.net>
Files: perly.c perly.y
Subject: Quote bearword package/handle FOO in "funcname FOO => 'bar'"
From: Chip Salzenberg <chip@atlantic.net>
Files: toke.c
OTHER CORE CHANGES
Subject: Warn on overflow of octal and hex integers
From: Chip Salzenberg <chip@atlantic.net>
Files: proto.h toke.c util.c
Subject: If -w active, warn for commas and hashes ('#') in qw()
From: Chip Salzenberg <chip@atlantic.net>
Files: toke.c
Subject: Fixes for pack('w')
From: Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
Files: pp.c t/op/pack.t
Subject: More complete output from sv_dump()
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: sv.c
Subject: Major '..' and debugger patches
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Files: lib/perl5db.pl op.c pp_ctl.c scope.c scope.h
Subject: Fix for formline()
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: global.sym mg.c perl.h pod/perldiag.pod pp_ctl.c proto.h sv.c t/op/write.t
Subject: Fix stack botch in untie and binmode
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: pp_sys.c
Subject: Complete EMBED, including symbols from interp.sym
From: Chip Salzenberg <chip@atlantic.net>
Files: MANIFEST embed.pl ext/DynaLoader/dlutils.c ext/SDBM_File/sdbm/sdbm.h global.sym handy.h malloc.c perl.h pp_sys.c proto.h regexec.c toke.c util.c x2p/Makefile.SH x2p/a2p.h x2p/handy.h x2p/util.h
New define EMBEDMYMALLOC makes embedding total by
avoiding "Mymalloc" etc.
Subject: Support old embedding for people who want it
From: Chip Salzenberg <chip@atlantic.net>
Files: MANIFEST Makefile.SH old_embed.pl old_global.sym
PORTABILITY
Subject: Miscellaneous VMS fixes
From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
Files: lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_VMS.pm lib/Math/Complex.pm lib/Time/Local.pm lib/timelocal.pl perl.h perl_exp.SH proto.h t/TEST t/io/read.t t/lib/findbin.t t/lib/getopt.t util.c utils/h2xs.PL vms/Makefile vms/config.vms vms/descrip.mms vms/ext/Stdio/Stdio.pm vms/ext/Stdio/Stdio.xs vms/perlvms.pod vms/test.com vms/vms.c
Subject: DJGPP patches (MS-DOS)
From: "Douglas E. Wegscheid" <wegscd@whirlpool.com>
Files: doio.c dosish.h ext/SDBM_File/sdbm/sdbm.c handy.h lib/AutoSplit.pm lib/Cwd.pm lib/File/Find.pm malloc.c perl.c perl.h pp_sys.c proto.h sv.c util.c
Subject: Patch to make Perl work under AmigaOS
From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de>
Files: MANIFEST hints/amigaos.sh installman lib/File/Basename.pm lib/File/Find.pm pod/pod2man.PL pp_sys.c util.c
|
|
|
|
|
|
| |
Extract x2p/Makefile.SH and x2p/cflags.SH correctly down
in the x2p directory, even if $0 isn't set to the full
pathname of the file being extracted.
|
|
|
|
|
|
|
|
| |
Use Configure's $sh and $make_set_make.
Remove MAB stuff, since it's now in ccflags.
Keep 5.003's RCS info.
|
|
|
|
|
| |
This commit just represents the minor differences between applying
the patch from 5.003_01 to 5.003_02 and the 5.003_02 release tarball.
|
| |
|
|
|
|
|
| |
This commit just represents the minor differences between applying the
patches from 5.003 to 5.003_01 and the 5.003_01 release tarball.
|
|
|
|
|
| |
Add MAB support for NeXT
Set up variable pointing to shell for OS/2 compatibility
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you're adventurous, have a look at
ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz
Many thanks to Andy for doing the integration.
Obviously, if you consult the bugs database, you'll note there are
still plenty of buglets that need fixing, and several enhancements that
I've intended to put in still haven't made it in (Hi, Tim and Ilya).
But I think it'll be pretty stable. And you can start to fiddle around
with prototypes (which are, of course, still totally undocumented).
Packrats, don't worry too much about readvertising this widely.
Nowadays we're on a T1 here, so our bandwidth is okay.
Have the appropriate amount of jollity.
Larry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To apply, change to your perl directory, run the commands above, then
apply with
patch -p1 -N < thispatch.
After you apply this patch, I would recommend:
rm config.sh
sh Configure [whatever options you use]
make depend
make
make test
Here are the highlights:
All pod documentation now installed, along with corresponding man
pages, if possible (Configure allows you to change this).
cppstdin no longer points back to the build directory. This
necessitated two changes to the test suite: comp/cpp.t is now a
front end that punts if cppstdin is not yet available (the old
perl4 trick doesn't work for perl5). The op/misc.t test
./perl -P -e 'use POSIX;' has been dropped since I couldn't think
of an elegant way to bypass it for systems that need the cppstdin
wrapper.
Grand autoload patch included (minus the installperl, lib/, and
ext/ changes). The lib/ changes are in patch.1g, and the
ext/ changes are in patch.1h.
Better detection and use of stdio variants, especially on SVR4.
Sarathy's consolidated patches (for ties) included.
New filter stuff included.
Three patches from Larry (gv.c, toke.c, pp_ctl.c)
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College Easton, PA 18042
Here's the file-by-file breakdown of what's included:
Changes.Conf
Document changes in the Configure & build process.
Configure
Upgrade to metaconfig PL55.
Add /opt hierarchy to paths searched for programs.
Tye McQueen's updated std stdio testing.
Prompting for installation info for perl module pages.
Add possible SITELIB to include site-specific include directories.
By default this is disabled, but it seemed a neat idea now that
the standard perl library is getting so big.
Check that the compiler chosen exists and actually supports the
options the user specified.
Correctly sort multiple shared library version numbers.
Use a compile & link test for gconvert(), dlopen(), and dlerror().
Do not include build directory name in cppstdin wrapper.
MANIFEST
Updated.
Makefile.SH
Reorganized a bit to support separate install.perl and install.man
targets to use the new installman script and to accomodate those who
don't want to install the man pages.
Organize cleanup of .SH files a little better.
No longer automatically make the pod/*.man files. This is done by
installman only if requested.
Include additional error messages and info for regenerating the
automatically maintained header files.
Add 'minitest' target.
README
Updated.
README.vms
Fix perl5-porters subscription info.
config_H
Updated.
config_h.SH
Updated.
configpm
Embedded pod.
configure
GNU configure-like front end to metaconfig's Configure.
Only supports a few options.
doio.c
Updated to use new std stdio testing.
embed.h
Add new symbols for filtering.
global.sym
see embed.h.
gv.c
C<sub method;> patch from lwall.
hints/README.hints
Updated.
hints/aux.sh
Updated.
hints/cxux.sh
Updated.
hints/epix.sh
New file.
hints/freebsd.sh
Updated.
hints/irix_4.sh
Updated.
hints/irix_5.sh
Updated.
hints/irix_6.sh
Updated.
hints/linux.sh
Updated.
hints/powerunix.sh
Updated.
installman
New file to install pod/*.pod and lib/*.p(m|od) man pages.
installperl
Move installation of man pages over to installman script.
Install pod/*.pod files in $privlib/pod/.
Preserve timestamps on .a files.
makedepend.SH
Now includes . and .. in PATH to explicitly find cppstdin wrapper.
opcode.h
opcode.pl
shmwrite fix.
perl.c
Changed unofficial patchlevel message.
Included optional SITELIB directory.
perl.h
#include <memory.h>
cryptswitch gone/filters added.
EUNICE replaced by UNLINK_ALL_VERSIONS. Only matters for VMS.
perldoc.SH
New file.
pod/perl.pod
Describe where modpods are.
pp_ctl.c
sort bug fix from lwall.
pp_hot.c
csh glob bug fix from tchrist.
Sarathy's consolidated "tie" patch for NETaa13753 N 2 trey
pp_sys.c
Emulate flock with lockf, if possible.
Use new std stdio unit.
proto.h
Filters stuff.
prototype for unlnk() is only needed #if UNLINK_ALL_VERSIONS
sv.c
Sarathy's consolidated "tie" patch for NETaa13753 N 2 trey
Sarathy's consolidated patch for nested ties.
Use new std stdio unit.
t/comp/cpp.aux
New file. This only gets called if cppstdin is avaiable.
t/comp/cpp.t
Calls cpp.aux test only if cppstdin is available.
t/op/misc.t
Drop
perl -P -e 'use POSIX;' test.
it couldn't work on systems without the cppstdin wrapper
installed, and is usually misleading when it fails anyway.
toke.c
filter stuff.
fix for NETaa13798 from lwall.
unixish.h
undef UNLINK_ALL_VERSIONS since it's irrelevant for unix.
util.c
s/EUNICE/UNLINK_ALL_VERSIONS/ for the unlnk() function.
vms/config.vms
VMS updates from Charles Bailey.
std stdio updates to match changes in perl sources.
add UNLINK_ALL_VERSIONS constant, but leave it #undef.
vms/ext/MM_VMS.pm
vms/ext/VMS/stdio/stdio.xs
vms/perlvms.pod
vms/vms.c
VMS updates from Charles Bailey.
x2p/Makefile.SH
Updated to match man page Configure questions.
Slight clean-up on .SH targets.
x2p/str.c
Use new std stdio unit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure
Updated to dist PL53.
Fix overlapping memcpy test.
Add check for ld. Use $cc instead, if on an ELF system.
With -d, don't reuse config.sh unless $myuname matches.
Warn more explicitly about changing compilers before reloading
old config.sh.
Detect Linux ELF format in nm scan.
Better detection of d_castneg. (ISC 4.1 was passing the test,
but couldn't cast in an argument list.)
Suggest -fpic for dynamic loading if you're using GNU CC under any
name.
No longer test for byacc, fmod, or drem, since they are not used.
Makefile.SH
Use $ld, not ld (only matters for SVR4)
Silence some byacc-related harmless error messages.
README
Suggest using -Dcc=gcc (or whatever).
Warn about reusing old config.sh. (The warning was already there
in 5.001; I've just expanded it a little.)
Warn against using GNU as and GNU ld on SunOS & Solaris.
config.H
config_h.SH
Updated to match Configure.
doio.c
Add socket includes.
ext/Fcntl/Fcntl.xs
Fix typo: s/SETFL/F_SETFL/;
handy.h
Check _G_HAVE_BOOL, not just if it's defined.
hints/dynix.sh
hints/hpux_9.sh
hints/linux.sh
hints/netbsd.sh
hints/titanos.sh
Updated. ELF on linux should probably work.
installperl
Install pod2html, pod2latex, and pod2man.
lib/ExtUtils/MakeMaker.pm
Updated to 4.091. (4.09 + a small writedoc() patch.)
myconfig
Now includes 'ld' command.
perl.c
Revised an #elif clause since Pyramid's cpp doesn't understand
#elif.
perl.h
Fix U_L, I_V, and I_32 cast macros to ensure that
the cast_ulong(), cast_iv(), and cast_i32() functions (if used)
are passed a double. In particular, the FIXSTATUS macros were
handing int's to U_L().
Remove unnecessary HAS_FMOD testing (See util.c).
proto.h
Remove my_fmod() prototype. (See util.c)
sv.h
Fix GV/CV typo.
util.c
Simplified cast_i32() and cast_iv() to mimic what *actually*
happens on a SPARC running SunOS 4.1.3. (Previously, they did
some complicated fmod() calculation. I've since discovered that's
not what happens on the SPARC.)
With this change, fmod() is no longer necessary. Hence my_fmod
is removed. This also means the HAS_FMOD and HAS_DREM tests are
no longer needed in Configure, so they are gone too.
vms/config.vms
Remove unnecessary HAS_FMOD and HAS_DREM defines.
x2p/Makefile.SH
Silence byacc-related things.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix]
This is my patch patch.1b for perl5.001.
[Actually, that's a lie. This is just a reposting of two of my
patches (removing some byacc dependencies and fixing some set*id
stuff) + one version of the x2p/walk.c emit_split() patch.
I've just usurped the letter 'b' to fit in my patch sequence.
You probably have already applied these as well, but again here they
are all packaged up nice and neatly for storage on ftp sites.]
Here's one possible solution to the byacc problem. Short summary:
make will think your perly.[ch] are out of date because perly.c.diff
has changed. They aren't really out of date, but the ordering of the
timestamps in the distribution fools make. I had put some traps in
perly.fixer to check to make sure that everything got run only if
you ran the same version of byacc (1.8) as Larry, but the traps aren't good
enough: There's a Cygnus version of byacc out there that also calls
itself 1.8 (with a +Cygnus xxx note attached). I don't think I'll
ever be able to reliably detect all mutant byacc's, so the safest
course of action seems to be to never run byacc.
(Yes, the perly.fixer check could be a _lot_ smarter. Volunteers?)
This simple-minded fix just puts in a
perly.c: perly.y
- touch perly.c
perly.h: perly.y
- touch perly.h
to bring perly.[ch] up to date, if needed.
The '-' are in case your source is read-only.
It also does the same trick in x2p/Makefile.SH.
WARNING! Danger! Larry, if you do this, it means you have to
explicitly call
make run_byacc
whenever you change perly.y, perly.c.diff, or
cd x2p; make run_byacc
if you change x2p/a2p.y.
However, it might be worth it. I leave it up to you.
|
|
|
|
| |
[See the Changes file for a list of changes]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes various non-broken things in the x2p/ directory.
Mostly, I've supplied function prototypes to satisfy particularly
picky compilers.
I've also updated Makefile.SH to know that the byacc-generated a2p.c
is now included with the distribution so that we no longer need to go
looking for yacc/bison/byacc and deal with various library issues or
command line options to support those various compiler compilers.
I've included a2p.c generated by byacc-1.9. Larry, feel free to
use your own from byacc-1.8 instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
[editor's note: this commit combines approximate 4 months of furious
releases of Andy Dougherty and Larry Wall - see pod/perlhist.pod for
details. Andy notes that;
Alas neither my "Irwin AccuTrack" nor my DC 600A quarter-inch cartridge
backup tapes from that era seem to be readable anymore. I guess 13 years
exceeds the shelf life for that backup technology :-(.
]
|
|
|
|
| |
[editor's note: from history.perl.org. The sparc executables
originally included in the distribution are not in this commit.]
|
|
|
|
| |
See patch #20.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subject: added eval {}
Subject: eval 'stuff' now optimized to eval {stuff}
This set of patches doesn't have many enhancements but this is
one of them. The eval operator has two distinct semantic functions.
First, it runs the parser on some random string and executes it.
Second, it traps exceptions and returns them in $@. There are times
when you'd like to get the second function without the first. In
order to do that, you can now eval a block of code, which is parsed
like ordinary code at compile time, but which traps any run-time
errors and returns them in the $@ variable. For instance, to
trap divide by zero errors:
eval {
$answer = $foo / $bar;
};
warn $@ if $@;
Since single-quoted strings don't ever change, they are optimized
to the eval {} form the first time they are encountered at run-time.
This doesn't happen too often, though some of you have written things
like eval '&try_this;'. However, the righthand side of s///e is
evaluated as a single-quoted string, so this construct should run
somewhat faster now.
Subject: added sort {} LIST
Another enhancement that some of you have been hankering for.
You can now inline the sort subroutine as a block where the
subroutine name used to go:
@articles = sort {$a <=> $b;} readdir(DIR);
Subject: added some support for 64-bit integers
For Convexen and Crayen, which have 64-bit integers, there's
now pack, unpack and sprintf support for 64-bit integers.
Subject: sprintf() now supports any length of s field
You can now use formats like %2048s and %-8192.8192s. Perl will
totally bypass your system's sprintf() function on these. No,
you still probably can't say %2048d. No, I'm not going to
change that any time soon.
Subject: substr() and vec() weren't allowed in an lvalue list
Subject: extra comma at end of list is now allowed in more places (Hi, Felix!)
Subject: underscore is now allowed within literal octal and hex numbers
Various syntactic relaxations. You can now get away with
(substr($foo,0,3), substr($bar,0,3)) = ('abc', 'def');
(1,2,3,)[$x];
$addr = 0x1a20_ff0b;
Subject: safe malloc code now integrated into Perl's malloc when possible
To save a bunch of subroutine calls. If you use your system's
malloc it still has to use wrappers.
Subject: added support for dbz
By saying "make dbzperl" you can make a copy of Perl that can
access C news's dbz files. You still have to follow the dbz rules,
though, if you're going to try to write a dbz file.
Subject: there are now subroutines for calling back from C into Perl
Subject: usub/curses.mus now supports SysV curses
More C linkage support. I still haven't got Perl embeddable, but
we're getting there. That's too big an enhancement for this
update, in which I've been trying to stick to bug fixes, with some
success.
Subject: prepared for ctype implementations that don't define isascii()
A larger percentage of this update consists of code to do
consistent ctype processing whether or not <ctype.h> is 8-bit
clean.
Subject: /$foo/o optimizer could access deallocated data
Subject: certain optimizations of //g in array context returned too many values
Subject: regexp with no parens in array context returned wacky $`, $& and $'
Subject: $' not set right on some //g
Subject: grep of a split lost its values
Subject: # fields could write outside allocated memory
Subject: length($x) was sometimes wrong for numeric $x
Recently added or modified stuff that you kind of expect to be
a bit flaky still. Well, I do...
Subject: passing non-existend array elements to subrouting caused core dump
Subject: "foo" x -1 dumped core
Subject: truncate on a closed filehandle could dump
Subject: a last statement outside any block caused occasional core dumps
Subject: missing arguments caused core dump in -D8 code
Subject: cacheout.pl could dump core from invalid comparison operator
Subject: *foo = undef coredumped
Subject: warn '-' x 10000 dumped core
Subject: index("little", "longer string") could visit faraway places
A bunch of natty little bugs that you wouldn't generally run into
unless you're trying to be coy.
Subject: hex() didn't understand leading 0x
It wasn't documented that it should work, but oct() understands 0x,
so why not hex()? I dunno...
Subject: "foo\0" eq "foo" was sometimes optimized to true
Subject: eval confused by string containing null
Yet more holdovers from the time before Perl was 8-bit clean.
Subject: foreach on null list could spring memory leak
Subject: local(*FILEHANDLE) had a memory leak
Kind of slow leaks, as leaks go. Still...
Subject: minimum match length calculation in regexp is now cumulative
More substitutions can be done in place now because Perl knows
that patterns like in s/foo\s+bar/1234567/ have to match a
certain number of characters total. It used to be on that
particular pattern that it only knew that it had to match at
least 3 characters. Now it know it has to match at least 7.
Subject: multiple reallocations now avoided in 1 .. 100000
You still don't want to say 1 .. 1000000, but at least it will
refrain from allocating intermediate sized blocks while it's
constructing the value, and won't do the extra copies implied
by realloc.
Subject: indirect subroutine calls through magic vars (e.g. &$1) didn't work
Subject: defined(&$foo) and undef(&$foo) didn't work
Subject: certain perl errors should set EBADF so that $! looks better
Subject: stats of _ forgot whether prior stat was actually lstat
Subject: -T returned true on NFS directory
Subject: sysread() in socket was substituting recv()
Subject: formats didn't fill their fields as well as they could
Subject: ^ fields chopped hyphens on line break
Subject: -P didn't allow use of #elif or #undef
Subject: $0 was being truncated at times
Subject: forked exec on non-existent program now issues a warning
Various things you'd expect to work the way you expect, but
didn't when you did, or I did, or something...
Subject: perl mistook some streams for sockets because they return mode 0 too
Subject: reopening STDIN, STDOUT and STDERR failed on some machines
Problems opening files portably. So what's new?
Subject: cppstdin now installed outside of source directory
Subject: installperl now overrides installer's umask
People who used cppstdin for the cpp filter or who had their
umask set to 700 will now be happier. (And Configure will now
prefer /lib/cpp over cppstdin like it used to. If this gives
your machine heartburn because /lib/cpp doesn't set the symbols
it should, write a hints file to poke them into ccflags.)
Subject: initial .* in pattern had dependency on value of $*
An initial .* was optimized to have a ^ on the front to avoid retrying
when we know it won't match. Unfortunately this implicit ^ was
paying attention to $*, which it shouldn't have been.
Subject: certain patterns made use of garbage pointers from uncleared memory
Many of you saw this as a failure in t/op/pat.t.
Subject: perl now issues warning if $SIG{'ALARM'} is referenced
Since the book mentions "SIGALARM", I thought we needed this.
Subject: solitary subroutine references no longer trigger typo warnings
You can now use -w (more) profitably on programs that require
other files. I figured if you mistype a subroutine name you'll
get a fatal error anyway, unlike a variable, which just defaults
to being undefined.
Subject: $foo .= <BAR> could overrun malloced memory
Good old-fashioned bug.
Subject: \$ didn't always make it through double-quoter to regexp routines
Subject: \x and \c were subject to double interpretation in regexps
Subject: nested list operators could miscount parens
Subject: sort eval "whatever" didn't work
Syntactic misfeatures of various sorts.
Subject: find2perl produced incorrect code for -group
Subject: find2perl could be confused by names containing whitespace
Subject: in a2p, split on whitespace produced extra null field
Translator stuff.
Subject: new complete.pl from Wayne Thompson
Subject: assert.pl and exceptions.pl from Tom Christiansen
Subject: added Tom's c2ph stuff
Subject: getcwd.pl from Brandon S. Allbery
Subject: fastcwd.pl from John Basik
Subject: chat2.pl from Randal L. Schwartz
New contributed stuff. Thanks!
(Not that a lot of the other stuff isn't contributed too...)
Subject: debugger got confused over nested subroutine definitions
Subject: once-thru blocks didn't display right in the debugger
Subject: perldb.pl modified to run within emacs in perldb-mode
Debugger stuff. The first two were caused by not saving line
numbers at exactly the right moment.
Subject: documented meaning of scalar(%foo)
I also updated the Errata section of the man page.
Subject: various portability fixes
Subject: random cleanup
Subject: saberized perl
Type casts, saber warning message suppression, hints files and various
metaconfig fiddlehoods.
|
|
|
|
| |
See patch #4.
|
|
|
|
| |
So far, 4.0 is still a beta test version. For the last production
version, look in pub/perl.3.0/kits@44.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of these patches are pretty self-explanatory. Much of this
is random cleanup in preparation for version 4.0, so I won't talk
about it here. A couple of things should be noted, however.
First, there's a new -0 option that allows you to specify (in octal)
the initial value of $/, the record separator. It's primarily
intended for use with versions of find that support -print0 to
delimit filenames with nulls, but it's more general than that:
null
^A
default
CR
paragraph mode
file slurp mode
This feature is so new that it didn't even make it into the book.
The other major item is that different patchlevels of perl can
now coexist in your bin directory. The names "perl" and "taintperl"
are just links to "perl3.044" and "tperl3.044". This has several
benefits. The perl3.044 invokes the corresponding tperl3.044 rather
than taintperl, so it always runs the correct version. Second, you can
"freeze" a script by putting a #! line referring to a version that
it is known to work with. Third, you can put a new version out
there to try out before making it the default perl. Lastly, it
sells more disk drives. :-)
Barring catastrophe, this will likely be the last patch before
version 4.0 comes out.
|
|
|
|
| |
Forget the description, it's too late at night...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This set of patches pretty much brings you up to the functionality
that version 4.0 will have. The Perl Book documents version 4.0.
Perhaps these should be called release notes... :-)
Enhancements:
Many of the changes relate to making the debugger work better.
It now runs your scripts at nearly full speed because it no longer
calls a subroutine on every statement. The debugger now doesn't
get confused about packages, evals and other filenames. More
variables (though still not all) are available within the debugger.
Related to this is the fact that every statement now knows which
package and filename it was compiled in, so package semantics are
now much more straightforward. Every variable also knows which
package it was compiled in. So many places that used to print
out just the variable name now prefix the variable name with the
package name. Notably, if you print *foo it now gives *package'foo.
Along with these, there is now a "caller" function which returns
the context of the current subroutine call. See the man page for
more details.
Chip Salzenberg sent the patches for System V IPC (msg, sem and shm)
so I dropped them in.
There was no way to wait for a specific pid, which was silly, since
Perl was already keeping track of the information. So I added
the waitpid() call, which uses Unix's wait4() or waitpid() if
available, and otherwise emulates them (at least as far as letting
you wait for a particular pid--it doesn't emulate non-blocking wait).
For use in sorting routines, there are now two new operators,
cmp and <=>. These do string and numeric comparison, returning
-1, 0 or 1 when the first argument is less than, equal to or
greater than the second argument.
Occasionally one finds that one wants to evaluate an operator in
a scalar context, even though it's part of a LIST. For this purpose,
there is now a scalar() operator. For instance, the approved
fix for the novice error of using <> in assigning to a local is now:
local($var) = scalar(<STDIN>);
Perl's ordinary I/O is done using standard I/O routines. Every
now and then this gets in your way. You may now access the system
calls read() and write() via the Perl functions sysread() and
syswrite(). They should not be intermixed with ordinary I/O calls
unless you know what you're doing.
Along with this, both the sysread() and read() functions allow you
an optional 4th argument giving an offset into the string you're
reading into, so for instance you can easily finish up partial reads.
As a bit of syntactic sugar, you can now use the file tests -M, -A
and -C to determine the age of a file in (possibly fractional) days
as of the time the script started running. This makes it much
easier to write midnight cleanup scripts with precision.
The index() and rindex() functions now have an optional 3rd argument
which tells it where to start looking, so you can now iterate through
a string using these functions.
The substr() function's 3rd argument is now optional, and if omitted,
the function returns everything to the end of the string.
The tr/// translation function now understands c, d and s options, just
like the tr program. (Well, almost just like. The d option only
deletes characters that aren't in the replacement string.) The
c complementes the character class to match and the s option squishes
out multiple occurrences of any replacement class characters.
The reverse function, used in a scalar context, now reverses its
scalar argument as a string.
Dale Worley posted a patch to add @###.## type fields to formats.
I said, "Neat!" and dropped it in, lock, stock and sinker.
Kai Uwe Rommel sent a bunch of MSDOS and OS/2 updates, which I (mostly)
incorporated. I can't vouch for them, but they look okay.
Any data stored after the __END__ marker can be accesses now via
the DATA filehandle, which is automatically opened onto the script
at that point. (Well, actually, it's just kept open, since it
was already open to read the script.)
The taintperl program now checks for world writable PATH components,
and complains if any are found (if PATH is used).
Bug fixes:
It used to be that you could get core dumps by such means as
@$foo=();
@foo[42];
(1,2,3)[42];
$#foo = 50;
foreach $elem (@foo) {
$elem = 1;
}
This is no longer so. (For those who are up on Perl internals, the
stack policy no longer allows Nullstr--all undefined values must
be passed as &str_undef.)
If you say something like
local($foo,$bar);
or
local($initialized,$foo,$bar) = ('one value');
$foo and $bar are now initialized to the undefined value, rather
than the defined null string.
Array assignment to special arrays is now better supported. For
instance, @ENV = () clears the environment, and %foo = () will
now clear any dbm file bound to %foo.
On the subject of dbm files, the highly visible bugs at patchlevel
28 have been fixed. You can now open dbm files readonly, and you
don't have to do a dummy assignment to make the cache allocate itself.
The modulus operator wasn't working right on negative values because
of a misplaced cast. For instance, -5 % 5 was returning
the value 5, which is clearly wrong.
Certain operations coredumped if you didn't supply a value:
close;
eof;
Previously, if the subroutine supplied for a sort operation didn't
exist, it failed quietly. Now it produces a fatal error.
The bitwise complement operator ~ didn't work on vec() strings longer
than one byte because of failure to increment a loop variable.
The oct and hex functions returned a negative result if the highest
bit was set. They now return an unsigned result, which seems a
little less confusing. Likewise, the token 0x80000000 also produces
an unsigned value now.
Some machines didn't like to see 0x87654321 in an #ifdef because
they think of the symbols as signed. The tests have been changed
to just look at the lower 4 nybbles of the value, which is sufficient
to determine endianness, at least as far as the #ifdefs are concerned.
The unshift operator did not return the documented value, which
was the number of elements in the new array. Instead it returned
the last unshifted argument, more or less by accident.
-w sometimes printed spurious warnings about ARGV and ENV when
referencing the arrays indirectly through shift or exec. This
was because the typo test was misplaced before the code that
exempts special variables from the typo test.
If you said 'require "./foo.pl"', it would look in someplace like
/usr/local/lib/perl/./foo.pl instead of the current directory. This
works more like people expect now. The require error messages also
referred to wrong file, if they worked at all.
The h2ph program didn't translate includes right--it should have
changed .h to .ph.
Patterns with multiple short literal strings sometimes failed.
This was a problem with the code that looks for a maximal literal
string to feed to the Boyer-Moore searching routine. The code
was gluing together literal strings that weren't continuous.
The $* variable controls multi-line pattern matching. When it's
0, patterns are supposed to match as if the string contained a
single line. Unfortunately, /^pat/ occasionally matched in middle
of string under certain conditions.
Recently the regular expression routines were upgraded to do
{n,m} more efficiently. In doing this, however, I manufactured
a couple of bugs: /.{n,m}$/ could match with fewer than n characters
remaining on the line, and patterns like /\d{9}/ could match more
than 9 characters.
The undefined value has an actual physical location in Perl, and
pointers to it are passed around. By certain circuitous routes
it was possible to clobber the undefined value so that it
was no longer undefined--kind of like making /dev/null into
a real file. Hopefully this can't happen any more.
op.stat could fail if /bin/0 existed, because of a while (<*>) {...
This has been changed to a while (defined($_ = <*>)) {...
The length of a search pattern was limited by the length of
tokenbuf internally. This restriction has been removed.
The null character gave the tokener indigestion when used as
a delimiter for m// or s///.
There was a bunch of other cleanupish things that are too trivial
to mention here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain systems, notable Ultrix, set the close-on-exec flag
by default on dup'ed file descriptors. This is anti-social
when you're creating a new STDOUT. The flag is now forced
off for STDIN, STDOUT and STDERR.
Some yaccs report 29 shift/reduce conflicts and 59 reduce/reduce
conflicts, while other yaccs and bison report 27 and 61. The
Makefile now says to expect either thing. I'm not sure if there's
a bug lurking there somewhere.
The defined(@array) and defined(%array) ended up defining
the arrays they were trying to determine the status of. Oops.
Using the status of NSIG to determine whether <signal.h> had
been included didn't work right on Xenix. A fix seems to be
beyond Configure at the moment, so we've got some OS dependent
#ifdefs in there.
There were some syntax errors in the new code to determine whether
it is safe to emulate rename() with unlink/link/unlink. Obviously
heavily tested code... :-)
Patch 27 introduced the possibility of using identifiers as
unquoted strings, but the code to warn against the use of
totally lowercase identifiers looped infinitely.
I documented that you can't interpolate $) or $| in pattern.
It was actually implied under s///, but it should have been
more explicit.
Patterns with {m} rather than {m,n} didn't work right.
Tests io.fs and op.stat had difficulties under AFS. They now
ignore the tests in question if they think they're running under
/afs.
The shift/reduce expectation message was off for a2p's Makefile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Well, I didn't quite fix 100 things--only 94. There are still
some other things to do, so don't think if I didn't fix your
favorite bug that your bug report is in the bit bucket. (It
may be, but don't think it. :-)
There are very few enhancements here. One is the new pipe()
function. There was just no way to emulate this using the
current operations, unless you happened to have socketpair()
on your system. Not even syscall() was useful in this respect.
Configure now determines whether volatile is supported, since
some compilers implement volatile but don't define __STDC__.
Some compilers can put structure members and global variables
into registers, so more variables had to be declared volatile
to avoid clobbering during longjmp().
Some systems have wanted routines stashed away in libBSD.a and
libPW.a. Configure can now find them.
A number of Configure tests create a file called "try" and then
execute it. Unfortunately, if there was a "try" elsewhere in PATH
it got that one instead. All references are now to "./try".
On Ultrix machines running the Mips cpu, some header files define
things differently for assembly language than for the C language.
To differentiate these, cc passes a -DLANGUAGE_C to the C preprocessor.
Unfortunately, Configure, makedepend and perl want to use the
preprocessor independently of cc. Configure now defaults to
adding -DLANGUAGE_C on machines containing that symbol in signal.h.
In Configure, some libraries were getting into the list more than
once, causing extra extraction overhead. The names are now
uniquified.
Someone has invented yet another output format for nm. Sigh.
Why do people assume that only people read the output of programs?
Due to commentary between a declaration and its semicolon, some
standard versions of stdio weren't being considered standard, and the
type of char used by stdio was being misidentified.
People trying to use bison instead of yacc ran into two problems.
One, lack of alloca(), is solved on some machines by finding libPW.a.
The other is that you have to supply a -y switch to bison to get
it to emulate yacc naming conventions. Configure now prompts
correctly for bison -y.
The make clean had a rm -f $suidperl where it just wanted
a rm -f suidperl
In the README, documented more weirdities on various machines,
including a pointer to the JMPCLOBBER symbol.
In the construct
OUTER: foreach (1,2,3) {
INNER: foreach (4,5) {
...
next OUTER;
}
}
the inner loop was not getting reset to the first element. This
was one of those bugs that arise because longjmp() doesn't
execute exit handlers as it unwinds the stack.
Perl reallocs many things as they grow, including the stack (its
stack, not the C program's stack). This means that routines
have to be careful to retreive the new stack when they call
subroutines that can do such a realloc. In cmd.c there was
such code but it was hidden inside an #ifdef JMPCLOBBER that
it should have been outside of, so you could get bad return
values of JMPCLOBBER wasn't defined. If you defined JMPCLOBBER
to work around this problem, you should consider undefining
it if your compiler guarantees that register variables get the value
they had either at setjmp() or longjmp() time. Perl runs
slightly faster without JMPCLOBBER defined.
The longjmp()s that perl does return known values, but as a
paranoid programming measure, it now checks that the values
are one of the expected ones.
If you say something like
while (s/ /_/) {}
the substitution almost always succeeds (on normal text). There
is an optimization that quickly discovers and bypasses operations
that are going to fail, but does nothing to help generally successful
ones such as the one above. So there's a heuristic that disables
the optimization if it isn't buying us anything. Unfortunately,
in the above case, it's in the conditional of a while loop,
which is duplicated by another optimization to be a
last unless s/ /_/;
at the end of the loop, to avoid unnecessary subroutine calls.
Because the conditional was duplicated (not the expression itself,
just the structure pointing to it), the heuristic mentioned above
tried to disable the first optimization twice, resulting in the
label stack getting corrupted.
Some subroutines which mix both return mechanisms like this:
sub foo {
local($foo);
return $foo if $whatever;
$foo;
}
This clobbered the return value of $foo when the end of the scope
of the local($foo) was reached. This was because such a routine
turns into something like this internally:
sub foo {
_SUB_: {
local($foo);
if ($whatever) {
$foo; last _SUB_;
}
$foo;
}
}
Because the outer _SUB_ block was manufactured by non-standard
means, it wasn't getting marked as an expression that could
return a value, ie a terminal expression. So the return value
wasn't getting properly saved off to the side before the local()
exited.
The internal label on subroutine blocks used to be SUB, but I
changed it to _SUB_ to avoid possible confusion. Evals now have
labels too, so they are labelled with _EVAL_. The reason evals
now have a label is that nested evals need separate longjmp
environments, or fatal errors end up getting a longjmp() botch.
So eval now uses the same label stack as loops and subroutines.
The eval routine used to always return undef on failure. In an
array context, however, this makes a non-null array, which when
assigned is TRUE, which is counter-intuitive. It now returns
a null array upon failure in an array context.
When a foreach operator works on a non-array, the compiler translates
foreach (1,2,3) {
into something like
@_GEN_0 = (1,2,3); foreach (@_GEN_0) {
Unfortunately, the line number was not correctly propagated to both
command structures, so huge line numbers could appear in error
messages and while debugging.
The x operator was stupidly written, just calling the internal
routine str_scat() multiple times, and not preextending the
string to the known new length. It now preextends the string
and calls a special routine to replicate the string quickly.
On long strings like '\0' x 1024, the operator is more than
10 times faster.
The split operator is supposed to split into @_ if called in
a scalar context. Unfortunately, it was also splitting into @_
in an array context that wasn't a real array, such as assignment
to a list:
($foo,$bar) = split;
This has now been fixed.
The split and substitute operators have a check to make sure
that it isn't looping endlessly. Unfortunate, they had a hardwired
limit of 10000 iterations. There are applications conceivable
where you could work on longer values than that, so they
now calculate a reasonable limit based on the length of the arguments.
Pack and unpack called atoi all the time on the template fields.
Since there are usually at most one or two digits of number,
this wasted a lot of time on machines with slow subroutine calls.
It now picks up the number itself.
There were several places that casts could blow up. In particular,
it appears that a sun3 can't cast a negative float to an unsigned
integer. Appropriate measure have been taken--hopefully this
won't blow someone else up.
A local($.) didn't work right because the actual value of the
current line number is derived from the last input filehandle.
This has been fixed by causing the last input filehandle to
be restored after the scope of a local($.) to what it was when
the local was executed.
Assignment is supposed to return the final value of the left
hand side. In the case of array assignment (in an array context),
it was actually returning the right hand side. This showed up in
things that referred to the actual elements of an array value,
such as grep(s/foo/bar/, @abc = @xyz), which modified @xyz rather
than @abc.
The syscall() function was returning a garbage value (the index of
the top of the stack, actually) rather than value of system call.
There was some discussion about how to open files with arbitrary
characters in the filename. In particular, the open function strips
trailing spaces. There was no way to suppress this. Now you can
put an explicit null at the end of the string
open(FOO,"$filename\0")
and this will hide any spaces on the end of the filename. The Unix
open() function will of course treat the null as the trailing delimiter.
As a hangover from when Perl was not useful on binary files, there
was a check to make sure that the file being opened was a normal
file or character special file or socket. Now that Perl can
handle binary data, this is useless, and has been removed.
Some versions of utime.h have microseconds specified as acusec and
modusec. Perl was referring to these in order to zero out the
fields. But not everyone has these. Perl now just bzero's out
the structure and refers only to fields that everyone has.
You used to have to say
($foo) = unpack("L",$bar);
Now you can say
$foo = unpack("L",$bar);
and it will just unpack the first thing specified by the template;
The subscripts for slices were ignoring the value of $[. (This
never made any difference for people who leave $[ set to 0.)
It seems reasonable that grep in a scalar context should return the
number of items matched so that it can be used in, say, a conditional.
Formerly it returned an undef.
Another problem with grep was that if you said something like
grep(/$1/, @foo)
then each iteration of grep was executing in the context of the
previous iteration's regexp, so $1 might be wiped out after the
first iteration. All iterations of grep now operate in the regexp
context of the grep operator itself.
The eg/README file now explicity states that the examples in
the eg directory are to be considered in the Public Domain, and
thus do not have the same restrictions as the Perl source.
In a previous patch the shift operator was made to shift @_ inside
of subroutines. This made some of the getopt code wrong.
The sample rename command (and the new relink command) can either
take a list of filenames from stdin, or if stdin is a terminal,
default to a * in the current directory.
A sample travesty program is now included. If you want to know what
it does, feed it about 10 Usenet articles, or the perl manual, and
see what it prints out.
If a return operator was embedded in an expression that supplied
a scalar context, but the subroutine containing the return was
called in an array context, an array was not returned correctly.
Now it is.
The !~ operator used to ignore the negation in an array context and
do the same thing as =~. It now always returns scalar even in
array context, so if you say
($foo) = ($bar !~ /(pat)/)
$foo will get a value of either 1 or ''.
Opens on pipes were defined to return the child's pid in the parent,
and FALSE in the child. Unfortunately, what the child actually
got was an undef, making it indistinguishable from a failure to
open the pipe successfully. The child now gets a 0, and undef
means a failure to fork a child.
Formerly, @array in a scalar context returned the last value of
the array, by analogy to the comma operator. This makes for
counter-intuitive results when you say
if (@array)
if 0 or '' is a legal array value. @array now returns the length
of the array (not the subscript of the last element, which is @#array).
To get the last element of the array you must either pop(@array) or
refer to $array[$#array].
The chdir operator with no argument was supposed to change directory
to your home directory, but it core dumped instead.
The wait operator was ignoring SIGINT and SIGQUIT, by analogy to
the system and pipe operations. But wait is a lower level operation,
and it gives you more freedom if those signals aren't automatically
ignored. If you want them ignored, you now have to explicitly
ignore them by setting the proper %SIG entry.
Different versions of /bin/mkdir and /bin/rmdir return different
messages upon failure. Perl now knows about more of them.
-l FILEHANDLE now disallowed
The use of the -l file test makes no sense on a filehandle, since
you can't open symbolic links. So -l FILEHANDLE now is a fatal
error. This also means you can't say -l _, which is also a
useless operation.
The heavy wizardry involved in saying $#foo -= 2 didn't work quite
right.
In formats, you can say ... in a ^ field to have ... output when
there is more for that field that is getting truncated. The
next field was getting shifted over by three characters, however.
The perl library routines abbrev.pl, complete.pl, getopt.pl and
getopts.pl were assuming $[ == 0. The Getopt routine wasn't
returning an error on unrecognized switches. The look.pl routine
had never been tested, and didn't work at all. Now it does.
There were several difficulties in termcap.pl. Togoto was documented
backwards for $rows and $cols. The Tgetent routine could loop
endlessly if there was a tc entry. And it didn't interpret the ^x
form of specifying control characters right because of base
treachery (031 instead of 31). There were also problems with
using @_ as a temporary array.
In perl.h, the unused VREG symbol was deleted because it conflicted
with somebody's header files.
If perl detects a #! line that specifies some other interpreter
than perl, it will now start up that interpreter for you. This
let's you specify a SHELL of perl to some programs.
The $/ variable specifies the input record separator. It was
possible to set it to a non-text character and read in an entire
text file as one input, but it wasn't possible to do that
for a binary file. Now you can undef $/, and there will be
no record separator, so you are guaranteed to get the entire
file with one <>.
The example in the manual of an open() inside a ?: had the
branches of the ?: backwards. I documented the fact that
grep can modify arrays in place (with caveats about modifying
literal values). I also put in how to deal with filenames
that might have arbitrary characters, and mentioned about the
problem of unflushed buffers on opens that cause forks.
It's now documented how to force top of page before the next write.
Formerly, $0 was guaranteed to contain the name of the perl script
only till the first regular expression was executed. It now
keeps that value permanently. $0 can no longer be used as a synonym
for $&.
The regular expression evaluator didn't handle character classes
with the 8th bit set. None of /[\200-\377]/, \d, \w or \s worked
right--the character class because signed characters were not
interpreted right, and the builtins because the isdigit(), isalpha()
and isspace() macros are only defined if isascii() is true.
Patterns of the form /\bfoo/i didn't work right because the \b
wants to compare the preceding character with the next one
to look for word boundaries, and the i modifier forced a move
of the string to a place where it couldn't do that without
examining malloc garbage.
The type glob syntax *foo produces the symbol table entry for
all the various foo variables. Perl has to do certain bookkeeping
when moving such values around. The symbol table entry was not
adequately differentiated from normal data to prevent occasion
confusion, however.
On MICROPORTs, the CRIPPLED_CC option made the stab_array()
and stab_hash() macros into function calls, but neglected to
supply the function definitions.
The string length allocated to turn a number into a string
internally turned out to be too short on a Sun 4.
Several constructs were not recognized properly inside double-quoted
strings:
underline in name
required @foo to be defined rather than %foo
threw off bracket matcher
not identified with $1
The base.term test gives misleading results if /dev/null happens
not to be a character special file. So it now checks for that.
The op.stat could exceed the shell's maximum argument length
when evaluating </usr/bin/*>. It now chdirs to /usr/bin and does <*>.
return grandfathered to never be function call
The construct
return (1,2,3);
did not do what was expected, since return was swallowing the
parens in order to consider itself a function. The solution,
since return never wants any trailing expression such as
return (1,2,3) + 2;
is to simply make return an exception to the paren-makes-a-function
rule, and treat it the way it always was, so that it doesn't
strip the parens.
If perldb.pl doesn't exist, there was no reasonable error message
given when you invoke perl -d. It now does a do-or-die internally.
null hereis core dumped
The hereis construct dumped core on a null string:
print <<'FOO';
FOO
Certain pattern matches weren't working on patterns with embedded
nulls because the fbminstr() routine, when it decided it couldn't
do a fancy search, degenerated to using instr(), rather than
ninstr(), which is better about embedded nulls.
The s2p sed-to-perl translator didn't translate \< and \> to \b.
Now it does.
The a2p awk-to-perl translator didn't put a $ on ExitValue when
translating the awk exit construct. It also didn't allow
logical expressions inside normal expressions:
i = ($1 == 2 || $2 ~ /bar/)
a2p.h had definition of a bzero() macro inside an ifdef of BCOPY.
The two don't always go together, and since Configure is already
looking for both separately...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The select operator didn't interpret bit vectors correctly on
non-little-endian machines such as Suns. Rather than bollux up
the rather straightforward interpretation of bit vectors, I made
the select operator rearrange the bytes as necessary. So it
is still true that vec($foo,0,1) refers to the first bit of the
first byte of string $foo, even on big-endian machines.
The send() socket operator didn't correctly allow you to specify
a TO argument even though this was documented. (The TO argument
is desirable for sending datagram packets.)
In ANSI standard C, they decided that longjmp() didn't have to
guarantee anything about registers. Several people sent me
some patches that declared certain variables as volatile
rather than register for such compilers. Rather than go that
route, however, I wanted to keep some of these variables in
registers, so I just made sure that the important ones are
restored from non-register locations after longjmp(). I think
"volatile" encourages people to punt too easily.
The foreach construct still had some difficulty with two nested
foreach loops referring to the same array, and to a single
foreach that called its enclosing subroutine recursively.
I think I've got this straight now. You wouldn't think
a little iterator would give some much trouble.
A pattern like /b*/ wouldn't match a null string before the
first character. And certain patterns didn't match correctly
at end of string. The upshot was that
$_ = 'aaa';
s/b*/x/g;
produced 'axaxa' rather than the expected 'xaxaxax'. This has
been fixed. Note however that the split operator will still
not match a null string before the first character, so that
split(/b*/,'aaa') produces ('a','a','a'), not ('','a','a','a','').
The saga continues, and hopefully concludes. I realized I was
fighting a losing battle trying to grep out all the includes
from <time.h> and <sys/time.h>. There are just too many funny
includes, symbols, links and such on too many kinds of machines.
Configure now compiles a test program several different ways to
figure out which way to define the various symbols.
Configure now lets you pick between yacc or bison for your
compiler compiler. If you pick bison, be sure you have alloca
somewhere on your system.
The ANSI function strerror() is now supported where available.
In addition, errno may now be a macro with an lvalue, so errno
isn't declared extern if it's defined as a macro in <errno.h>.
The memcpy() and memset() are now allowed to return void.
There is now support for sys/ndir.h for systems such as Xenix.
It's now also easier to cross compile on a 386 for a 286.
DG/UX has functions setpgrp2() and getpgrp2() to keep the BSD
sematics separate from the SystemV semantics. So now we have
yet another wonderful non-standard way of doing things. There
is also a utime.h file which lets them put time stamps on
files to microsecond resolutions, though perl doesn't take
advantage of this.
The list of optional libraries to be searched for now includes
-lnet_s, -lnsl_s, -lsocket and -lx. We can now find .h files
down in /usr/include/lan.
Microport systems have problems. I've added some CRIPPLED_CC
support for them, but you still need to read the README.uport
file for some extra rigamarole.
In the README file, there are now hints for what to do if your
compile doesn't work right, and specific hints for machines
known to require certain switches.
The grep operator with a simple first argument, such as grep(1,@array),
didn't work right. That one seems silly, but grep($_,@array)
didn't work either. Now it does.
A /$pat/ followed by a // wrongly freed the runtime pattern twice,
causing ill-will on the part of all concerned.
The ord() function now always returns positive even on signed-char
machines. This seems to be less surprising to people. If you
still want a signed value on such machines, you can always use
unpack.
The lib/complete.pl file misused the @_ array. The array has
been renamed.
In the man page, I clarified that s`pat`repl` does command
substitution on the replacement string, that $timeleft from
select() is likely not implemented in many places, and that
the qualified form package'filehandle works as well as
$package'variable. It is also explicitly stated that
certain identifiers (non-alpha, STDIN, etc.) are always
resolved in package main's symbol table.
Perl didn't grok setuid scripts that had a space on the
first line between the shebang and the interpreter name.
In stab.c, sighandler() may now return either void or int,
depending on the value of VOIDSIG.
You couldn't debug a script that used -p or -n because they would
try to slap an extra } on the end of the perldb.pl file. This
upset the parser.
The interpration of strings like " ''$foo'' " caused problems
because the tokener didn't realize that neither single quote
following the variable was indicating a package qualifier.
(It knew the last one wasn't, but was confused about the first one.)
Merely changing an if to a while fixed it. Well, two if's.
Another place we don't want ' to be interpreted as a package
qualifier is if it's the delimiter for an m'pat' or s'pat'repl'.
These have been grandfathered to look like a match and a substitution.
There were a couple of problems in a2p. First, the ops array
was dimensioned too big on 286's. Second, there was a problem
involving passing a union where I should've passed a member of
the union, which meant user-defined functions didn't work right
on some machines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some machines have bcopy() but not bzero(), so Configure
tests for them separately now. Likewise for symlink() and lstat().
Some systems have dirent.h but not readdir(). The symbols BZERO,
LSTAT and READDIR are now used to differentiate.
Some machines have <time.h> including <sys/time.h>. Some do
the opposite. Some don't even have <sys/time.h>. Configure
now looks for both kinds of include, and the saga continues...
Configure tested twice for the presence of -lnm because x2p/Makefile.SH
had a reference to the obsolete $libnm variable. It now tests
only once.
Some machines have goodies stashed in /usr/include/sun,
/usr/include/bsd, -lsun and -lbsd. Configure now checks those
locations.
Configure could sometimes add an option to a default of none,
producing [none -DDEBUGGING] prompts. This is fixed.
Many of the units in metaconfig used the construct
if xxx=`loc...`; then
On most machines the exit status of loc ends up in $?, but on
a few machines, the assignment apparently sets $? to 0, since
it always succeeds. Oh well...
The tests for byte order had difficulties with illegal octal
digits and constants that were too long, as well as not defining
the union in try.c correctly.
When <dirent.h> was missing, it was assumed that the field d_namlen
existed. There is now an explicit check of <sys/dir.h> for the field.
The tests of <signal.h> to see how signal() is declared needed to have
signal.h run through the C preprocessor first because of POSIX ifdefs.
The type returned by getgroups() was defaulting wrong on Suns and
such. Configure now checks against the lint library if it exists
to produce a better default.
The construct
foreach $elem (@array) {
foreach $elem (@array) {
...
}
}
didn't work right because the iterator for the array was stored
with the array rather than with the node in the syntax tree.
If you said
defined $foo{'bar'}
it would create the element $foo{'bar'} while returning the
correct value. It now no longer creates the value.
The grep() function was occasionally losing arguments or dumping core.
This was because it called eval() on each argument but didn't
account for the fact that eval() is capable of reallocating the
stack.
If you said
$something ? $foo[1] : $foo[2]
you ended up (usually) with
$something ? $foo[0] : $foo[0]
because of the way the ?: operator tries to fool the stack into
thinking there's only one argument there instead of three. This
only happened to constant subscripts. Interestingly enough,
$abc[1] ? $foo[1] : $bar[1]
would have worked, since the first argument has the same subscript.
Some machines already define TRUE and FALSE, so we have to undef
them to avoid warnings.
Several people sent in some fixes for manual typos and indent problems.
There was a reqeust to clarify the difference between $! and $@, and
I added a gratuitous warning about print making an array context for
its arguments, since people seem to run into that frequently.
suidperl could correctly emulate a setgid script, but then it could
get confused about what the actual effective gid was.
Some machine or other defines sighandler(), so perl's sighandler()
needed to be made static.
We changed uchar to unchar for Crays, and it turns out that lots
of SysV machines typedef unchar instead. Sigh. It's now un_char.
If you did substitutions to chop leading components off a string,
and then set the string from <filehandle>, under certain circumstances
the input string could be corrupted because str_gets() called
str_grow() without making sure to change the strings current length to
be the number of characters just read, rather than the old length.
op.stat occasionally failed with NFS race condition, so it now waits
two seconds instead of one to guarantee that the NFS server advances
its clock at least one second.
IBM PC/RT compiler can't deal with UNI() and LOP() macros. If you
define CRIPPLED_CC it now will recast those macros as subroutines,
which runs a little slower but doesn't give the compiler heartburn.
The } character can terminate either an associative array subscript
or a BLOCK. These set up different expectations as to whether the
next token might be a term or an operator. There was a faulty
heuristic based on whether there was an intervening newline.
It turns out that if } simply leaves the current expectations along,
the right thing happens.
The command y/abcde// didn't work because the length of the first
part was not correctly copied to the second part.
In s2p, line labels without a subsequent statement were done wrong,
since an extra semicolon needs to be supplied. It wasn't always
suppplied, and when it was supplied, it was in the wrong place.
S2p also needed to remove its /tmp files better.
A2p translates
for (a in b)
to
foreach $a} (keys(%b))
on Pyramids, because index(s, '}' + 128) doesn't find a } with the
top bit set. This has been fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure had difficulties if the user's path had weird components.
Now Configure appends the user's path to its own.
Some machines need <netinet/in.h> included in order to define
certain macros for packing or unpacking network order data.
On Suns, the shared library is used by default. If it doesn't
contain something contained in /lib/libc.a, then Configure was
getting things wrong (such as gethostent()). Now Configure uses
the shared library if it's there in preference to libc.a.
When gcc was selected as the compiler, the cc flags defaulted to
-fpcc_struct_return. Unfortunately, the underlines should be hyphens.
Configure figures out if BSD shadow passwords are installed and
the getpw* routines now return slightly different data in the
affected fields.
Some of the prompts in Configure with regard to gid and uid types
were unclear as to their intended use. They are now a little
clearer.
Sometimes you could change a .h file and taintperl and suidperl
didn't get remade correctly because of missing dependencies
in the Makefile.
The README file was misleading about the fact that you have to
say "make test" before you can "cd t; TEST"
The reverse operator was busted in two different ways. Should work
better now. There are now regression tests for it.
Some of the optimizations that perl does are disabled after period
of time if perl decides they aren't doing any good. One of these
caused a string to be freed that was later referenced via another
pointer, causing core dumps. The free turned out to be unnecessary,
so it was removed.
The unless modifier was broken when run under the debugger, due to
the invert() routine in perl.y inverting the logic on the DB
subroutine call instead of the command the unless was modifying.
Configure vfork test was backwards. It now works like other defines.
The numeric switch optimization was broken, and caused code to be
bypassed. This has been fixed.
A split in a subroutine that has no target splits into @_.
Unfortunately, this wrongly freed any referenced arguments passed
in through @_, causing confusing behavior later in the program.
File globbing (<foo.*>) left one orphaned string each time it
called the shell to do the glob.
RCS expanded an unintended $Header in lib/perldb.pl. This has
been fixed simply by replacing the $ with a .
Some forward declarations of static functions were missing from
malloc.c.
There's a strut in malloc for mips machines to extend the overhead
union to the size of a double. This was also enabled for sparc
machines.
DEC risc machines are reported to have a buggy memcmp. I've put
some conditional code into perl.h which I think will undef MEMCMP
appropriately.
In perl.man.4, I documented the desirability of using parens even
where they aren't strictly necessary.
I've grandfathered "format stdout" to be the same as "format STDOUT".
Unary operators can be called with no argument. The corresponding
function call form using empty parens () didn't work right, though
it did for certain functions in 2.0. It now works in 3.0.
The string ordering tests were wrong for pairs of strings in which
one string was a prefix of the other. This affected lt, le, gt,
ge, and the sort operator when used with no subroutine.
$/ didn't work with the stupid code used when STDSTDIO was undefined.
The stupid code has been replaced with smarter code that can do
it right. Special thanks to Piet van Oostrum for the code.
Goulds work better if the union in STR is at an 8 byte boundary.
The fields were rearranged somewhat to provide this.
"sort keys %a" should now work right (though parens are still
desirable for readability).
bcopy() needed a forward declaration on some machines.
In x2p/Makefile.SH, added dependency on ../config.sh so that it
gets linked down from above if it got removed for some reason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few of the new features: (18 Oct)
* Perl can now handle binary data correctly and has functions to pack and unpack binary structures into arrays or lists. You can now do arbitrary ioctl functions.
* You can now pass things to subroutines by reference.
* Debugger enhancements.
* An array or associative array may now appear in a local() list.
* Array values may now be interpolated into strings.
* Subroutine names are now distinguished by prefixing with &. You can call subroutines without using do, and without passing any argument list at all.
* You can use the new -u switch to cause perl to dump core so that you can run undump and produce a binary executable image. Alternately you can use the "dump" operator after initializing any variables and such.
* You can now chop lists.
* Perl now uses /bin/csh to do filename globbing, if available. This means that filenames with spaces or other strangenesses work right.
* New functions: mkdir and rmdir, getppid, getpgrp and setpgrp, getpriority and setpriority, chroot, ioctl and fcntl, flock, readlink, lstat, rindex, pack and unpack, read, warn, dbmopen and dbmclose, dump, reverse, defined, undef.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the enhancements from Perl1 included:
* New regexp routines derived from Henry Spencer's.
o Support for /(foo|bar)/.
o Support for /(foo)*/ and /(foo)+/.
o \s for whitespace, \S for non-, \d for digit, \D nondigit
* Local variables in blocks, subroutines and evals.
* Recursive subroutine calls are now supported.
* Array values may now be interpolated into lists: unlink 'foo', 'bar', @trashcan, 'tmp';
* File globbing.
* Use of <> in array contexts returns the whole file or glob list.
* New iterator for normal arrays, foreach, that allows both read and write.
* Ability to open pipe to a forked off script for secure pipes in setuid scripts.
* File inclusion via do 'foo.pl';
* More file tests, including -t to see if, for instance, stdin is a terminal. File tests now behave in a more correct manner. You can do file tests on filehandles as well as filenames. The special filetests -T and -B test a file to see if it's text or binary.
* An eof can now be used on each file of the <> input for such purposes as resetting the line numbers or appending to each file of an inplace edit.
* Assignments can now function as lvalues, so you can say things like ($HOST = $host) =~ tr/a-z/A-Z/; ($obj = $src) =~ s/\.c$/.o/;
* You can now do certain file operations with a variable which holds the name of a filehandle, e.g. open(++$incl,$includefilename); $foo = <$incl>;
* Warnings are now available (with -w) on use of uninitialized variables and on identifiers that are mentioned only once, and on reference to various undefined things.
* There is now a wait operator.
* There is now a sort operator.
* The manual is now not lying when it says that perl is generally faster than sed. I hope.
|
|
|
|
|
|
|
| |
The version of malloc.c that comes with perl was not really intended
to be used everywhere--it was included mostly for debugging purposes.
It's a nice little package, however, so I'm making it optional (via
Configure) as to whether you want it or not.
|
|
[ Perl is kind of designed to make awk and sed semi-obsolete. This posting
will include the first 10 patches after the main source. The following
description is lifted from Larry's manpage. --r$ ]
Perl is a interpreted language optimized for scanning arbitrary text
files, extracting information from those text files, and printing
reports based on that information. It's also a good language for many
system management tasks. The language is intended to be practical
(easy to use, efficient, complete) rather than beautiful (tiny,
elegant, minimal). It combines (in the author's opinion, anyway) some
of the best features of C, sed, awk, and sh, so people familiar with
those languages should have little difficulty with it. (Language
historians will also note some vestiges of csh, Pascal, and even
BASIC-PLUS.) Expression syntax corresponds quite closely to C
expression syntax. If you have a problem that would ordinarily use sed
or awk or sh, but it exceeds their capabilities or must run a little
faster, and you don't want to write the silly thing in C, then perl may
be for you. There are also translators to turn your sed and awk
scripts into perl scripts.
|