source: trunk/essentials/dev-lang/perl/Changes5.001@ 3296

Last change on this file since 3296 was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 47.0 KB
Line 
1-------------
2Version 5.001
3-------------
4
5Nearly all the changes for 5.001 were bug fixes of one variety or another,
6so here's the bug list, along with the "resolution" for each of them. If
7you wish to correspond about any of them, please include the bug number.
8
9There were a few that can be construed as enhancements:
10 NETaa13059: now warns of use of \1 where $1 is necessary.
11 NETaa13512: added $SIG{__WARN__} and $SIG{__DIE__} hooks
12 NETaa13520: added closures
13 NETaa13530: scalar keys now resets hash iterator
14 NETaa13641: added Tim's fancy new import whizbangers
15 NETaa13710: cryptswitch needed to be more "useable"
16 NETaa13716: Carp now allows multiple packages to be skipped out of
17 NETaa13716: now counts imported routines as "defined" for redef warnings
18 (and, of course, much of the stuff from the perl5-porters)
19
20NETaa12974: README incorrectly said it was a pre-release.
21Files patched: README
22
23NETaa13033: goto pushed a bogus scope on the context stack.
24From: Steve Vinoski
25Files patched: pp_ctl.c
26 The goto operator pushed an extra bogus scope onto the context stack. (This
27 often didn't matter, since many things pop extra unrecognized scopes off.)
28
29NETaa13034: tried to get valid pointer from undef.
30From: Castor Fu
31Also: Achille Hui, the Day Dreamer
32Also: Eric Arnold
33Files patched: pp_sys.c
34 Now treats undef specially, and calls SvPV_force on any non-numeric scalar
35 value to get a real pointer to somewhere.
36
37NETaa13035: included package info with filehandles.
38From: Jack Shirazi - BIU
39Files patched: pp_hot.c pp_sys.c
40 Now passes a glob to filehandle methods to keep the package info intact.
41
42NETaa13048: didn't give strict vars message on every occurrence.
43From: Doug Campbell
44Files patched: gv.c
45 It now complains about every occurrence. (The bug resulted from an
46 ill-conceived attempt to suppress a duplicate error message in a
47 suboptimal fashion.)
48
49NETaa13052: test for numeric sort sub return value fooled by taint magic.
50From: Peter Jaspers-Fayer
51Files patched: pp_ctl.c sv.h
52 The test to see if the sort sub return value was numeric looked at the
53 public flags rather than the private flags of the SV, so taint magic
54 hid that info from the sort.
55
56NETaa13053: forced a2p to use byacc
57From: Andy Dougherty
58Files patched: MANIFEST x2p/Makefile.SH x2p/a2p.c
59 a2p.c is now pre-byacced and shipped with the kit.
60
61NETaa13055: misnamed constant in previous patch.
62From: Conrad Augustin
63Files patched: op.c op.h toke.c
64 The tokener translates $[ to a constant, but with a special marking in case
65 the constant gets assigned to or localized. Unfortunately, the marking
66 was done with a combination of OPf_SPECIAL and OPf_MOD that was easily
67 spoofed. There is now a private OPpCONST_ARYLEN flag for this purpose.
68
69NETaa13055: use of OPf_SPECIAL for $[ lvaluehood was too fragile.
70Files patched: op.c op.h toke.c
71 (same)
72
73NETaa13056: convert needs to throw away any number info on its list.
74From: Jack Shirazi - BIU
75Files patched: op.c
76 The listiness of the argument list leaked out to the subroutine call because
77 of how prepend_elem and append_elem reuse an existing list. The convert()
78 routine just needs to discard any listiness it finds on its argument.
79
80NETaa13058: AUTOLOAD shouldn't assume size of @_ is meaningful.
81From: Florent Guillaume
82Files patched: ext/DB_File/DB_File.pm ext/Fcntl/Fcntl.pm ext/GDBM_File/GDBM_File.pm ext/Socket/Socket.pm h2xs.SH
83 I just deleted the optimization, which is silly anyway since the eventual
84 subroutine definition is cached.
85
86NETaa13059: now warns of use of \1 where $1 is necessary.
87From: Gustaf Neumann
88Files patched: toke.c
89 Now says
90
91 Can't use \1 to mean $1 in expression at foo line 2
92
93 along with an explanation in perldiag.
94
95NETaa13060: no longer warns on attempt to read <> operator's transition state.
96From: Chaim Frenkel
97Files patched: pp_hot.c
98 No longer warns on <> operator's transitional state.
99
100NETaa13140: warning said $ when @ would be more appropriate.
101From: David J. MacKenzie
102Files patched: op.c pod/perldiag.pod
103 Now says
104
105 (Did you mean $ or @ instead of %?)
106
107 and added more explanation to perldiag.
108
109NETaa13149: was reading freed memory to make incorrect error message.
110Files patched: pp_ctl.c
111 It was reading freed memory to make an error message that would be
112 incorrect in any event because it had the inner filename rather than
113 the outer.
114
115NETaa13149: confess was sometimes less informative than croak
116From: Jack Shirazi
117Files patched: lib/Carp.pm
118 (same)
119
120NETaa13150: stderr needs to be STDERR in package
121From: Jack Shirazi
122Files patched: lib/File/CheckTree.pm
123 Also fixed pl2pm to translate the filehandles to uppercase.
124
125NETaa13150: uppercases stdin, stdout and stderr
126Files patched: pl2pm
127 (same)
128
129NETaa13154: array assignment didn't notice package magic.
130From: Brian Reichert
131Files patched: pp_hot.c
132 The list assignment operator looked for only set magic, but set magic is
133 only on the elements of a magical hash, not on the hash as a whole. I made
134 the operator look for any magic at all on the target array or hash.
135
136NETaa13155: &DB::DB left trash on the stack.
137From: Thomas Koenig
138Files patched: lib/perl5db.pl pp_ctl.c
139 The call by pp_dbstate() to &DB::DB left trash on the stack. It now
140 calls DB in list context, and DB returns ().
141
142NETaa13156: lexical variables didn't show up in debugger evals.
143From: Joergen Haegg
144Files patched: op.c
145 The code that searched back up the context stack for the lexical scope
146 outside the eval only partially took into consideration that there
147 might be extra debugger subroutine frames that shouldn't be used, and
148 ended up comparing the wrong statement sequence number to the range of
149 valid sequence numbers for the scope of the lexical variable. (There
150 was also a bug fixed in passing that caused the scope of lexical to go
151 clear to the end of the subroutine even if it was within an inner block.)
152
153NETaa13157: any request for autoloaded DESTROY should create a null one.
154From: Tom Christiansen
155Files patched: lib/AutoLoader.pm
156 If DESTROY.al is not located, it now creates sub DESTROY {} automatically.
157
158NETaa13158: now preserves $@ around destructors while leaving eval.
159From: Tim Bunce
160Files patched: pp_ctl.c
161 Applied supplied patch, except the whole second hunk can be replaced with
162
163 sv_insert(errsv, 0, 0, message, strlen(message));
164
165NETaa13160: clarified behavior of split without arguments
166From: Harry Edmon
167Files patched: pod/perlfunc.pod
168 Clarified the behavior of split without arguments.
169
170NETaa13162: eval {} lost list/scalar context
171From: Dov Grobgeld
172Files patched: op.c
173 LEAVETRY didn't propagate number to ENTERTRY.
174
175NETaa13163: clarified documentation of foreach using my variable
176From: Tom Christiansen
177Files patched: pod/perlsyn.pod
178 Explained that foreach using a lexical is still localized.
179
180NETaa13164: the dot detector for the end of formats was over-rambunctious.
181From: John Stoffel
182Files patched: toke.c
183 The dot detector for the end of formats was over-rambunctious. It would
184 pick up any dot that didn't have a space in front of it.
185
186NETaa13165: do {} while 1 never linked outer block into next chain.
187From: Gisle Aas
188Files patched: op.c
189 When the conditional of do {} while 1; was optimized away, it confused the
190 postfix order construction so that the block that ordinarily sits around the
191 whole loop was never executed. So when the loop tried to unstack between
192 iterations, it got the wrong context, and blew away the lexical variables
193 of the outer scope. Fixed it by introducing a NULL opcode that will be
194 optimized away later.
195
196NETaa13167: coercion was looking at public bits rather than private bits.
197From: Randal L. Schwartz
198Also: Thomas Riechmann
199Also: Shane Castle
200Files patched: sv.c
201 There were some bad ifdefs around the various varieties of set*id(). In
202 addition, tainting was interacting badly with assignment to $> because
203 sv_2iv() was examining SvPOK rather than SvPOKp, and so couldn't coerce
204 a string uid to an integer one.
205
206NETaa13167: had some ifdefs wrong on set*id.
207Files patched: mg.c pp_hot.c
208 (same)
209
210NETaa13168: relaxed test for comparison of new and old fds
211From: Casper H.S. Dik
212Files patched: t/lib/posix.t
213 I relaxed the comparison to just check that the new fd is greater.
214
215NETaa13169: autoincrement can corrupt scalar value state.
216From: Gisle Aas
217Also: Tom Christiansen
218Files patched: sv.c
219 It assumed a PV didn't need to be upgraded to become an NV.
220
221NETaa13169: previous patch could leak a string pointer.
222Files patched: sv.c
223 (same)
224
225NETaa13170: symbols missing from global.sym
226From: Tim Bunce
227Files patched: global.sym
228 Applied suggested patch.
229
230NETaa13171: \\ in <<'END' shouldn't reduce to \.
231From: Randal L. Schwartz
232Files patched: toke.c
233 <<'END' needed to bypass ordinary single-quote processing.
234
235NETaa13172: 'use integer' turned off magical autoincrement.
236From: Erich Rickheit KSC
237Files patched: pp.c pp_hot.c
238 The integer versions of the increment and decrement operators were trying too
239 hard to be efficient.
240
241NETaa13172: deleted duplicate increment and decrement code
242Files patched: opcode.h opcode.pl pp.c
243 (same)
244
245NETaa13173: install should make shared libraries executable.
246From: Brian Grossman
247Also: Dave Nadler
248Also: Eero Pajarre
249Files patched: installperl
250 Now gives permission 555 to any file ending with extension specified by $dlext.
251
252NETaa13176: ck_rvconst didn't free the const it used up.
253From: Nick Duffek
254Files patched: op.c
255 I checked in many random memory leaks under this bug number, since it
256 was an eval that brought many of them out.
257
258NETaa13176: didn't delete XRV for temp ref of destructor.
259Files patched: sv.c
260 (same)
261
262NETaa13176: didn't delete op_pmshort in matching operators.
263Files patched: op.c
264 (same)
265
266NETaa13176: eval leaked the name of the eval.
267Files patched: scope.c
268 (same)
269
270NETaa13176: gp_free didn't free the format.
271Files patched: gv.c
272 (same)
273
274NETaa13176: minor leaks in loop exits and constant subscript optimization.
275Files patched: op.c
276 (same)
277
278NETaa13176: plugged some duplicate struct allocation memory leaks.
279Files patched: perl.c
280 (same)
281
282NETaa13176: sv_clear of an FM didn't clear anything.
283Files patched: sv.c
284 (same)
285
286NETaa13176: tr/// didn't mortalize its return value.
287Files patched: pp.c
288 (same)
289
290NETaa13177: SCOPE optimization hid line number info
291From: David J. MacKenzie
292Also: Hallvard B Furuseth
293Files patched: op.c
294 Every pass on the syntax tree has to keep track of the current statement.
295 Unfortunately, the single-statement block was optimized into a single
296 statement between the time the variable was parsed and the time the
297 void code scan was done, so that pass didn't see the OP_NEXTSTATE
298 operator, because it has been optimized to an OP_NULL.
299
300 Fortunately, null operands remember what they were, so it was pretty easy
301 to make it set the correct line number anyway.
302
303NETaa13178: some linux doesn't handle nm well
304From: Alan Modra
305Files patched: hints/linux.sh
306 Applied supplied patch.
307
308NETaa13180: localized slice now pre-extends array
309From: Larry Schuler
310Files patched: pp.c
311 A localized slice now pre-extends its array to avoid reallocation during
312 the scope of the local.
313
314NETaa13181: m//g didn't keep track of whether previous match matched null.
315From: "philippe.verdret"
316Files patched: mg.h pp_hot.c
317 A pattern isn't allowed to match a null string in the same place twice in
318 a row. m//g wasn't keeping track of whether the previous match matched
319 the null string.
320
321NETaa13182: now includes whitespace as a regexp metacharacter.
322From: Larry Wall
323Files patched: toke.c
324 scan_const() now counts " \t\n\r\f\v" as metacharacters when scanning a pattern.
325
326NETaa13183: sv_setsv shouldn't try to clone an object.
327From: Peter Gordon
328Files patched: sv.c
329 The sv_mortalcopy() done by the return in STORE called sv_setsv(),
330 which cloned the object. sv_setsv() shouldn't be in the business of
331 cloning objects.
332
333NETaa13184: bogus warning on quoted signal handler name removed.
334From: Dan Carson
335Files patched: toke.c
336 Now doesn't complain unless the first non-whitespace character after the =
337 is an alphabetic character.
338
339NETaa13186: now croaks on chop($')
340From: Casper H.S. Dik
341Files patched: doop.c
342 Now croaks on chop($') and such.
343
344NETaa13187: "${foo::bar}" now counts as mere delimitation, not as a bareword.
345From: Jay Rogers
346Files patched: toke.c
347 "${foo::bar}" now counts as mere delimitation, not as a bareword inside a
348 reference block.
349
350NETaa13188: for backward compatibility, looks for "perl -" before "perl".
351From: Russell Mosemann
352Files patched: toke.c
353 Now allows non-whitespace characters on the #! line between the "perl"
354 and the "-".
355
356NETaa13188: now allows non-whitespace after #!...perl before switches.
357Files patched: toke.c
358 (same)
359
360NETaa13189: derivative files need to be removed before recreation
361From: Simon Leinen
362Also: Dick Middleton
363Also: David J. MacKenzie
364Files patched: embed_h.sh x2p/Makefile.SH
365 Fixed various little nits as suggested in several messages.
366
367NETaa13190: certain assignments can spoof pod directive recognizer
368From: Ilya Zakharevich
369Files patched: toke.c
370 The lexer now only recognizes pod directives where a statement is expected.
371
372NETaa13194: now returns undef when there is no curpm.
373From: [email protected]
374Files patched: mg.c
375 Since there was no regexp prior to the "use", it was returning whatever the
376 last successful match was within the "use", because there was no current
377 regexp, so it treated it as a normal variable. It now returns undef.
378
379NETaa13195: semop had one S too many.
380From: Joachim Huober
381Files patched: opcode.pl
382 The entry in opcode.pl had one too many S's.
383
384NETaa13196: always assumes it's a Perl script if -c is used.
385From: Dan Carson
386Files patched: toke.c
387 It now will assume it's a Perl script if the -c switch is used.
388
389NETaa13197: changed implicit -> message to be more understandable.
390From: Bruce Barnett
391Files patched: op.c pod/perldiag.pod
392 I changed the error message to be more understandable. It now says
393
394 Can't use subscript on sort...
395
396
397NETaa13201: added OPpCONST_ENTERED flag to properly enter filehandle symbols.
398From: E. Jay Berkenbilt
399Also: Tom Christiansen
400Files patched: op.c op.h toke.c
401 The grammatical reduction of a print statement didn't properly count
402 the filehandle as a symbol reference because it couldn't distinguish
403 between a symbol entered earlier in the program and a symbol entered
404 for the first time down in the lexer.
405
406NETaa13203: README shouldn't mention uperl.o any more.
407From: Anno Siegel
408Files patched: README
409
410NETaa13204: .= shouldn't warn on uninitialized target.
411From: Pete Peterson
412Files patched: pp_hot.c
413 No longer warns on uninitialized target of .= operator.
414
415NETaa13206: handy macros in XSUB.h
416From: Tim Bunce
417Files patched: XSUB.h
418 Added suggested macros.
419
420NETaa13228: commonality checker didn't treat lexicals as variables.
421From: [email protected]
422Files patched: op.c opcode.pl
423 The list assignment operator tries to avoid unnecessary copies by doing the
424 assignment directly if there are no common variables on either side of the
425 equals. Unfortunately, the code that decided that only recognized references
426 to dynamic variables, not lexical variables.
427
428NETaa13229: fixed sign stuff for complement, integer coercion.
429From: Larry Wall
430Files patched: perl.h pp.c sv.c
431 Fixed ~0 and integer coercions.
432
433NETaa13230: no longer tries to reuse scratchpad temps if tainting in effect.
434From: Luca Fini
435Files patched: op.c
436 I haven't reproduced it, but I believe the problem is the reuse of scratchpad
437 temporaries between statements. I've made it not try to reuse them if
438 tainting is in effect.
439
440NETaa13231: *foo = *bar now prevents typo warnings on "foo"
441From: Robin Barker
442Files patched: sv.c
443 Aliasing of the form *foo = *bar is now protected from the typo warnings.
444 Previously only the *foo = \$bar form was.
445
446NETaa13235: require BAREWORD now introduces package name immediately.
447From: Larry Wall
448Files patched: toke.c
449 require BAREWORD now introduces package name immediately. This lets the
450 method intuit code work right even though the require hasn't actually run
451 yet.
452
453NETaa13289: didn't calculate correctly using arybase.
454From: Jared Rhine
455Files patched: pp.c pp_hot.c
456 The runtime code didn't use curcop->cop_arybase correctly.
457
458NETaa13301: store now throws exception on error
459From: Barry Friedman
460Files patched: ext/GDBM_File/GDBM_File.xs ext/NDBM_File/NDBM_File.xs ext/ODBM_File/ODBM_File.xs ext/SDBM_File/SDBM_File.xs
461 Changed warn to croak in ext/*DBM_File/*.xs.
462
463NETaa13302: ctime now takes Time_t rather than Time_t*.
464From: Rodger Anderson
465Files patched: ext/POSIX/POSIX.xs
466 Now declares a Time_t and takes the address of that in CODE.
467
468NETaa13302: shorter way to do this patch
469Files patched: ext/POSIX/POSIX.xs
470 (same)
471
472NETaa13304: could feed too large $@ back into croak, whereupon it croaked.
473From: Larry Wall
474Files patched: perl.c
475 callist() could feed $@ back into croak with more than a bare %s. (croak()
476 handles long strings with a bare %s okay.)
477
478NETaa13305: compiler misoptimized RHS to outside of s/a/print/e
479From: Brian S. Cashman <[email protected]>
480Files patched: op.c
481 The syntax tree was being misconstructed because the compiler felt that
482 the RHS was invariant, so it did it outside the s///.
483
484NETaa13314: assigning mortal to lexical leaks
485From: Larry Wall
486Files patched: sv.c
487 In stealing strings, sv_setsv was checking SvPOK to see if it should free
488 the destination string. It should have been checking SvPVX.
489
490NETaa13316: wait4pid now recalled when errno == EINTR
491From: Robert J. Pankratz
492Files patched: pp_sys.c util.c
493 system() and the close() of a piped open now recall wait4pid if it returned
494 prematurely with errno == EINTR.
495
496NETaa13329: needed to localize taint magic
497From: Brian Katzung
498Files patched: sv.c doio.c mg.c pp_hot.c pp_sys.c scope.c taint.c
499 Taint magic is now localized better, though I had to resort to a kludge
500 to allow a value to be both tainted and untainted simultaneously during
501 the assignment of
502
503 local $foo = $_[0];
504
505 when $_[0] is a reference to the variable $foo already.
506
507NETaa13341: clarified interaction of AnyDBM_File::ISA and "use"
508From: Ian Phillipps
509Files patched: pod/modpods/AnyDBMFile.pod
510 The doc was misleading.
511
512NETaa13342: grep and map with block would enter block but never leave it.
513From: Ian Phillipps
514Files patched: op.c
515 The compiler use some sort-checking code to handle the arguments of
516 grep and map. Unfortunately, this wiped out the block exit opcode while
517 leaving the block entry opcode. This doesn't matter to sort, but did
518 matter to grep and map. It now leave the block entry intact.
519
520 The reason it worked without the my is because the block entry and exit
521 were optimized away to an OP_SCOPE, which it doesn't matter if it's there
522 or not.
523
524NETaa13343: goto needed to longjmp when in a signal handler.
525From: Robert Partington
526Files patched: pp_ctl.c
527 goto needed to longjmp() when in a signal handler to get back into the
528 right run() context.
529
530
531NETaa13344: strict vars shouldn't apply to globs or filehandles.
532From: Andrew Wilcox
533Files patched: gv.c
534 Filehandles and globs will be excepted from "strict vars", so that you can
535 do the standard Perl 4 trick of
536
537 use strict;
538 sub foo {
539 local(*IN);
540 open(IN,"file");
541 }
542
543
544NETaa13345: assert.pl didn't use package DB
545From: Hans Mulder
546Files patched: lib/assert.pl
547 Now it does.
548
549NETaa13348: av_undef didn't free scalar representing $#foo.
550From: David Filo
551Files patched: av.c
552 av_undef didn't free scalar representing $#foo.
553
554NETaa13349: sort sub accumulated save stack entries
555From: David Filo
556Files patched: pp_ctl.c
557 COMMON only gets set if assigning to @_, which is reasonable. Most of the
558 problem was a memory leak.
559
560NETaa13351: didn't treat indirect filehandles as references.
561From: Andy Dougherty
562Files patched: op.c
563 Now produces