Mailing List Archive

The diff between Perl 4 and Perl 5
So I was curious how much the leap from Perl 4 to Perl 5 was - I only ever
used 5. I know that the internals are massively different, but the tests?

So comparing the trees from:

commit e334a159a5616cab575044bafaf68f75b7bb3a16 (HEAD, tag: perl-4.0.36)
Author: Larry Wall <lwall@netlabs.com>
Date: Thu Feb 4 22:50:33 1993 +0000

perl 4.0 patch 36: (combined patch)

Since Ed Barton sent me a patch for the malignent form of "Malformed
cmd links", I finally broke down and made a patch for the various
other little things that have been accumulating on version 4.


and:

commit a0d0e21ea6ea90a22318550944fe6cb09ae10cda (HEAD, tag: perl-5.000)
Author: Larry Wall <lwall@netlabs.com>
Date: Mon Oct 17 23:00:00 1994 +0000

perl 5.000

[.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 :-(.
]


In the perl4 checkout, normalise the tests:

rm ./t/io/fs.t.rej
rm ./t/io/fs.t.orig
mv t/lib/big.t t/lib/bigint.t
mv t/op/dbm.t t/lib/anydbm.t
mv t/op/s.t t/op/subst.t


In both remove RCS noise:

perl -pi -we 's/^# \$(?:Header|RCSfile): .*\$$/# \$ XXX \$/' `find t -name \*.t`

and


$ for file in `find t -name \*.t`; do diff -u $file ../perl5/$file; done | diffstat
base/lex.t | 27 ++++++++++++++++++------
base/term.t | 4 +--
cmd/elsif.t | 8 +++----
cmd/mod.t | 2 -
cmd/subval.t | 36 ++++++++++++++++-----------------
cmd/switch.t | 2 -
cmd/while.t | 16 +++++++-------
comp/cmdopt.t | 20 +++++++++---------
comp/cpp.t | 2 -
comp/multiline.t | 2 -
comp/package.t | 10 +++++----
comp/script.t | 5 +++-
io/tell.t | 2 -
lib/anydbm.t | 32 ++++++++++++++++++-----------
lib/bigint.t | 4 ++-
op/array.t | 4 +--
op/chop.t | 44 +++++++++++++++++++++++++++++++++++++++-
op/delete.t | 10 ++++++++-
op/eval.t | 2 -
op/flip.t | 4 +--
op/goto.t | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
op/groups.t | 2 -
op/local.t | 4 +--
op/magic.t | 29 +++++++++++++++++++-------
op/ord.t | 4 ++-
op/pack.t | 24 +++++++++++++++++++++-
op/pat.t | 26 ++++++++++++++++++++++-
op/push.t | 9 ++++++--
op/read.t | 2 -
op/readdir.t | 7 +++++-
op/sort.t | 6 ++---
op/split.t | 5 +++-
op/stat.t | 5 +++-
op/subst.t | 25 +++++++++++++++++++++-
op/substr.t | 4 +--
op/time.t | 10 ++++++---
op/write.t | 24 ++++++++++++----------
37 files changed, 360 insertions(+), 122 deletions(-)

(out of a total of 3771 lines in Perl 4's t directory)

Also, a chunk of that -122 lines is test count changes. So the true diff
is much lower than that.

Curiously, despite this

Setting $#array lower now discards array elements so that destructors
work reasonably.

in https://github.com/Perl/perl5/blob/perl-5.000/Changes

(a particular piece of breaking behaviour change I was aware of) there were
no tests for it, hence no tests needed changing.


Nicholas Clark