[comp.lang.perl] REPOST: Request help PERL 3.0/PL28 on SCO UNIX t/TEST fails

gorpong@ping.uucp (Gordon C. Galligher) (08/25/90)

As the subject suggests, this is a repost of my earlier question.  I have
received no responses to it, and I still need help.  Since my request to 
send me e-mail failed, would you kindly post the thoughts/results/etc.
any of you might have?  I attempted to keep the bandwidth down, but it did
not seem to have any effect.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=ORIGINAL ARTICLE-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I am having problems executing the t/TEST file with Perl Patchlevel 28.
I am getting the error:

        % ./perl TEST
        Bad label: <null> at TEST line 25, <config> line 196.

Lines 21-28 are:
================
        open(config,"../config.sh");
        while (<config>) {
            if (/sharpbang='(.*)'/) {
                $sharpbang = ($1 eq '#!');
=====>          last;
            }
        }

Quite a while back, when I first started Perl programming I noticed a similar
problem with a bare 'last'.  I programmed around it, because I figured I was 
doing something wrong.  I can execute: /usr/local/bin/perl TEST, which is
PERL 3.0/PL18 and it begins to run the tests.  Obviously there was something 
changed between PL18 and PL28 which has caused a bare 'last' to fail (at 
least on an SCO UNIX system).  Line 196 in ../config.sh is:
                sharpbang=': use '
I cannot infer from this why the command is failing, but I figured it would
be important for you to know what line 196 was.

I am running:
=============
$Header: perly.c,v 3.0.1.7 90/08/13 22:22:22 lwall Locked $
Patch level: 28

Copyright (c) 1989, 1990, Larry Wall

Perl may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the Perl 3.0 distribution kit.
====================
on an 80386 with SCO UNIX System V.3.2.

Can anyone shed some light on this problem and how to fix it?  It is getting
late (when you get up at 6:00am, 11:00pm is pretty late!) and I cannot seem
to see where the problem is.

My thanks to anyone who can help me!

                -- Gordon.
-- 
Gordon C. Galligher	9127 Potter Rd. #2E	Des. Plaines, Ill.	60016
     telxon!ping%gorpong@uunet.uu.net (not tested)  (Is this even legal??)
     ...!uunet!telxon!ping!gorpong      (tested)    (And it works!)
"It seems to me, Golan, that the advance of civilization is nothing but an
 exercise in the limiting of privacy." - Janov Pelorat -- _Foundation's Edge_

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (08/25/90)

In article <1990Aug25.001158.7120@ping.uucp> gorpong@ping.uucp (Gordon C. Galligher) writes:
: I am having problems executing the t/TEST file with Perl Patchlevel 28.
: I am getting the error:
: 
:         % ./perl TEST
:         Bad label: <null> at TEST line 25, <config> line 196.

Several possibilities.

Check for kit corruption.  Patch 19 changes the lines in eval.c which read:

        if (loop_ptr < 0)
            fatal("Bad label: %s", maxarg > 0 ? tmps : "<null>");

to

        if (loop_ptr < 0) {
            if (tmps && strEQ(tmps, "_SUB_"))
                fatal("Can't return outside a subroutine");
            fatal("Bad label: %s", maxarg > 0 ? tmps : "<null>");
        }

Look for misplaced or missing curlies.

Try compiling cmd.c with -DJMPCLOBBER.

Try compiling everything with -DDEBUGGING and then use perl -D4 to check that
label pushes and pops match.

Look around for patch reject files that you might have inadvertently
overlooked.

Send me cmd.c and eval.c and I'll tell you if they've gotten munged.

Larry