Skip to content

Commit 93a17b2

Browse files
author
Larry Wall
committed
perl 5.0 alpha 3
[editor's note: the sparc executables have not been included, and emacs backup files have been removed]
1 parent 7907280 commit 93a17b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+10178
-3207
lines changed

Bugs/minmax

Lines changed: 0 additions & 12 deletions
This file was deleted.

Bugs/misparse

Lines changed: 0 additions & 2 deletions
This file was deleted.

Bugs/pagdir

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Article 433 of comp.os.386bsd.apps:
2+
Path: netlabs!news.cerf.net!usc!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!ai-lab!life.ai.mit.edu!mycroft
3+
From: [email protected] (Charles Hannum)
4+
Newsgroups: comp.os.386bsd.apps
5+
Subject: Re: Perl-4.036?
6+
Date: 06 Sep 1993 19:01:10 GMT
7+
Organization: MIT Artificial Intelligence Lab
8+
Lines: 9
9+
Message-ID: <[email protected]>
10+
11+
NNTP-Posting-Host: trinity.gnu.ai.mit.edu
12+
In-reply-to: [email protected]'s message of 6 Sep 1993 18:27:16 GMT
13+
14+
15+
Perl 4.036 comipled without a single hitch under NetBSD 0.9 last
16+
week. It failed the db test, but I suspect that is due to the new
17+
db stuff under NetBSD and the like...
18+
19+
Yes. The perl test seems to expect the database to be put in
20+
`foo.pag' and `foo.dir', which isn't the case any more. I suspect
21+
lwall will fix this soon.
22+
23+
24+

Bugs/replacecase

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s/\w/[\u$&\l$&]/gi;

Bugs/stuff

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Article 13355 of comp.lang.perl:
2+
Newsgroups: comp.lang.perl
3+
Path: netlabs!news.cerf.net!usc!cs.utexas.edu!uunet!fmrco!fmrco!asherman
4+
From: [email protected] (Aaron Sherman)
5+
Subject: Re: perl 5a2 cannot "die" (plus current list o' bugs)
6+
In-Reply-To: [email protected]'s message of Fri, 20 Aug 1993 21:32:10 GMT
7+
Message-ID: <[email protected]>
8+
9+
X-Quote: "...accepting is much harder than giving." -Mike Smith
10+
11+
Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
12+
13+
Date: Mon, 23 Aug 1993 14:42:50 GMT
14+
Lines: 47
15+
16+
17+
>>>>> [email protected] (Bill Middleton) said:
18+
19+
wjm> [email protected] writes:
20+
21+
>An interesting pair of bugs can be seen in the following output:
22+
23+
wjm> I dont think so. Could be in the compilation or something. Did it
24+
wjm> pass all tests? Each of the following work fine here on this HP.
25+
26+
I tried compiling with Sun's native CC and GCC. Both worked fine, but
27+
caused this problem. I'll try it with Larry's original version when I
28+
get a chance.
29+
30+
wjm> perl5 -e 'die "hello $. \n";
31+
wjm> hello
32+
33+
Ah. But, note that the $. STILL isn't working. So only ONE of those
34+
bugs did not show.
35+
36+
This is my current list of bugs (not complete, but what I've had time
37+
to note). Hope it helps:
38+
39+
"perl -e die" will cause a seg-fault
40+
41+
$. is not updated
42+
43+
Memory leak for anonymous arrays:
44+
while(1) { @a = (1, 2, 3, [4, 5], 6); @a = (); }
45+
Will keep allocating and not freeing memory.
46+
47+
"perl -e 'sub foo {print 1} foo'" should either complain or call foo,
48+
but does neither. Or, did Larry not impliment the &-less
49+
function calling that he was talking about?
50+
51+
"perl -le 'sub foo {1} $a = \&foo; print &{$a}; print &{$a} + 1'" should
52+
not fail to parse.
53+
54+
55+
-AJS
56+
57+
--
58+
Aaron Sherman I-Kinetics, Inc.
59+
Systems Engineer "Open Systems Stepstones"
60+
Voice: (617)661-8181 19 Bishop Allen Dr.
61+
Fax: (617)661-8625 Cambridge, MA 02139
62+
Pager: (508)545-0584 [email protected]
63+
64+

Changes

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,75 @@
1-
1+
Incompatibilities
2+
-----------------
23
s'$lhs'$rhs' now does no interpolation on either side. It used to
34
interplolate $lhs but not $rhs.
45

56
The second and third arguments of splice are now evaluated in scalar
67
context (like the book says) rather than list context.
78

8-
Saying shift @foo + 20 is now a semantic error.
9+
Saying "shift @foo + 20" is now a semantic error because of precedence.
10+
11+
"open FOO || die" is now incorrect. You need parens around the filehandle.
912

1013
The elements of argument lists for formats are now evaluated in list
11-
context.
14+
context. This means you can interpolate list values now.
1215

13-
You can't do a goto into a block that is optimized away.
16+
You can't do a goto into a block that is optimized away. Darn.
1417

1518
It is no longer syntactically legal to use whitespace as the name
1619
of a variable.
1720

1821
Some error messages will be different.
22+
23+
The caller function now a false value in a scalar context if there is
24+
no caller. This lets library files determine if they're being required.
25+
26+
m//g now attaches its state to the searched string rather than the
27+
regular expression.
28+
29+
New things
30+
----------
31+
The -w switch is much more informative.
32+
33+
References. See t/op/ref.t for examples.
34+
35+
Objects. See t/op/ref.t for examples.
36+
37+
=> is now a synonym for comma. This is useful as documentation for
38+
arguments that come in pairs, such as initializers for associative arrays,
39+
or named arguments to a subroutine.
40+
41+
All functions have been turned into list operators or unary operators,
42+
meaning the parens are optional. Even subroutines may be called as
43+
list operators if they've already been declared.
44+
45+
More embeddible. See main.c and embed_h.SH.
46+
47+
The interpreter is now flattened out. Compare Perl 4's eval.c with
48+
the perl 5's pp.c. Compare Perl 4's 900 line interpreter loop in cmd.c
49+
with Perl 5's 1 line interpreter loop in run.c. Eventually we'll make
50+
everything non-blocking so we can interface nicely with a scheduler.
51+
52+
eval is now treated more like a subroutine call. Among other things,
53+
this means you can return from it.
54+
55+
Format value lists may be spread over multiple lines by enclosing in
56+
curlies.
57+
58+
You may now define BEGIN and END subroutines for each package. The BEGIN
59+
subroutine executes the moment it's parsed. The END subroutine executes
60+
just before exiting.
61+
62+
Flags on the #! line are interpreted even if the script wasn't
63+
executed directly. (And even if the script was located by "perl -x"!)
64+
65+
The ?: operator is now legal as an lvalue.
66+
67+
List context now propagates to the right side of && and ||, as well
68+
as the 2nd and 3rd arguments to ?:.
69+
70+
The "defined" function can now take a general expression.
71+
72+
Lexical scoping available via "my". eval can see the current lexical
73+
variables.
74+
75+
Saying "package;" requires explicit package name on global symbols.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ shlist:
360360
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
361361
$(obj) hv.o:
362362
@ echo "You haven't done a "'"make depend" yet!'; exit 1
363+
363364
makedepend: makedepend.SH
364365
/bin/sh $(shellflags) makedepend.SH
365366

Todo

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
1+
POSIX compatibility
2+
hash binding
3+
pack(P)
4+
fix gv refcnts
5+
6+
/\Afoo/ (beginning of string, or where previous g match left off)
7+
/foo\Z/ (end of string only)
8+
Make specialized allocators
9+
Optimize switch statements
10+
Optimize foreach on array
11+
Optimize foreach (1..1000000)
112
Set KEEP on constant split
2-
Optimize foreach on array.
3-
Execute all BEGINs and ENDs.
4-
Make a good way to determine if *.pl is being executed directly.
5-
Make specialized allocators.
6-
Optimize switches.
7-
Do debugger
8-
Cache eval tree
9-
Implement eval once
10-
Cache m//g state
13+
Cache eval tree (unless lexical outer scope used (mark in &compiling?))
1114
rcatmaybe
12-
Fix length($&)
13-
eval {} coredump
15+
Cache method lookup
16+
Shrink opcode tables via multiple implementations selected in peep
17+
Straighten out the RS stuff in BEGIN
18+
Make yyparse recursion longjmp() proof.
1419

20+
sub mysplice(@, $, $, ...)?
21+
pretty function? (or is it, as I suspect, a lib routine?)
22+
perlex function?
23+
X Perl? Motif Perl?
24+
give DOG $bone?
25+
Nested destructors?
1526
make tr/// return histogram in list context?
16-
Do anything with "hint"?
27+
Implement eval once? (Unnecessary with cache?)
1728
When does split() go to @_?
1829
undef wantarray in void context?
30+
goto &coroutine?
31+
filehandle references?

bar

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
###############################################################################
1+
#!./perl
2+
3+
sub foo;
4+
5+
foo;

config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ medium=''
233233
large=''
234234
huge=''
235235
optimize='-g'
236-
ccflags=' -I/usr/include/sun -I/usr/ucbinclude -DDEBUGGING'
237-
cppflags=' -I/usr/include/sun -I/usr/ucbinclude -DDEBUGGING'
236+
ccflags='-DDEBUGGING'
237+
cppflags='-DDEBUGGING'
238238
ldflags=''
239239
cc='cc'
240240
nativegcc=''

0 commit comments

Comments
 (0)