Article View: comp.sources.bugs
Article #261Re: Perl problems/bugs
From: Larry Wall
Date: Fri, 01 Dec 1989 20:27
Date: Fri, 01 Dec 1989 20:27
48 lines
2337 bytes
2337 bytes
In article <3063@cello.UUCP> sanders@sanders.uucp (Tony Sanders) writes:
: I'm having a coupla problems with perl RT/AIX 2.2.1. Perl 3.0 is the
: first version I've used so I know not if this is new:
: sanders:pts0 % perl -v
: $Header: perly.c,v 3.0.1.2 89/11/17 15:34:42 lwall Locked $
: Patch level: 6
:
: 1) The complete.pl that comes with perl reads:
: ...
: sub Complete {
: local ($prompt) = shift (@_);
: local ($c, $cmp, $l, $r, $ret, $return, $test, $x);
: @_ = sort @_;
: ...
:
: However the "@_ = sort @_;" seems to nuke the @_ array, leaving
: it null. I worked around this by simply changing all @_ references
: in the sub to @x and that works great. Bug or feature?
Bug. In perl 3.0 the @_ array was made to pass items in by reference,
so it's not a "real" array in some senses. The code for assignment
should make it into a real array, but it doesn't (yet).
: 2) When I do a "make test" various tests fail:
: cmd.subval, op.dbm, op.index, op.mkdir, op.pack,
: op.read, op.sort, op.substr, op.vec
:
: like:
:
: sanders:pts0 % perl cmd.subval
: syntax error in file cmd.subval at line 91, next 2 tokens ");"
: Execution aborted due to compilation errors.
:
: I found that line 91:
: return (1,2,3);
: when changed to:
: return(1,2,3); # no space after keyword
: works DFK.
:
: This is also true for the other tests mostly print statements.
: Again, bug or feature that you cannot have a space after a keyword?
A compiler problem. Try defining CRIPPLED_CC, which turns some complicated
macros into subroutines. If that doesn't work, turn off your optimizer for
at least toke.c, maybe for everything.
Larry Wall
lwall@jpl-devvax.jpl.nasa.gov
Technical Details
Message-ID:
<6527@jpl-devvax.JPL.NASA.GOV>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jpl-devvax!lwallReferences:
<3063@cello.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.sources.bugs Subject: Re: Perl problems/bugs Message-ID: <6527@jpl-devvax.JPL.NASA.GOV> Date: 1 Dec 89 20:27:52 GMT References: <3063@cello.UUCP> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 48