Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Bugs in perl 3.0 pl 8 -- return statement Message-ID: <6991@jpl-devvax.JPL.NASA.GOV> Date: 5 Feb 90 23:46:49 GMT References: <4080004@hpausla.aso.hp.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 18 In article <4080004@hpausla.aso.hp.com> brian@hpausla.aso.hp.com (Brian Coogan) writes: : I've just been fighting with the return statement of perl 3.0 pl 8 and : losing badly. There appear to be some bugs, or something rather : non-intuitive, about the way return works. There were at least three little return buglets that should be fixed in patch 9. 1) Couldn't return (). 2) Occasional return of garbage value (or dump of core) in calling a subroutine the first time through (i.e. when growing the stack). This is caused by some statements in cmd.c misplaced inside #ifdef JMPCLOBBER. If defining #JMPCLOBBER manually fixes this, it's probably this bug. Patch 9 will fix it so you can undef JMPCLOBBER again for a little efficiency. 3) A return embedded in an expression could lose track of whether an array value or scalar was required for the function. Larry