[comp.lang.perl] PERL 3.0 PL28 defined

gorpong@ping.uucp (Gordon C. Galligher) (09/10/90)

Due to many problems I was having with Perl 3.0/PL28 on an SCO UNIX 3.2
system, I decided to re-make all of it and apply all patches from 19-28.
Upon getting it to that stage, I noticed a bug.  When executing t/op.undef
it fails on test 20.  This tests the defined(...) operator to test the
existence of a function.  It always returns FALSE (or whatever FALSE is
in PERL).  I have not had the opportunity to delve into the source to 
submit a quick patch for any SCO UNIX sites out there.  All other tests
worked (except for op.dbm).

I have been having another problem on EVERY perl system dealing with
packages, but that is a different subject, and I need to do more testing
before I post anything on it.

Any idea on why defined(&fcn) is broken?  Comments, Larry?
(I did have to apply patch28 by hand because it was totally corrupted, so
I do know that the entire thing was done.  None of the other patches even
hiccuped.)

OTHER SCO UNIX INFO::
=====================
You may already know this but I am posting this for others who may have
SCO Unix out there.
	1).  You must give the -Sm10000 option to yacc
	2).  You must use the 'rcc' compiler, NOT 'cc'
	3).  You need to /*#define ODBM in config.h.  The dbm test just
	     hangs in PL28.  It works on PL18, except for test 10, so I
	     do believe something in PL28 has caused it to break.
	4).  The obvious problem with defined(&fcn) which I mentioned
	     earlier.

I hope this helps, and any help on why defined(&fcn) fails would be greatly
appreciated.

		-- Gordon.
-- 
Gordon C. Galligher	9127 Potter Rd. #2E	Des. Plaines, Ill.    60016-4881
     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) (09/11/90)

In article <1990Sep10.052102.5148@ping.uucp> gorpong@ping.uucp (Gordon C. Galligher) writes:
: Due to many problems I was having with Perl 3.0/PL28 on an SCO UNIX 3.2
: system, I decided to re-make all of it and apply all patches from 19-28.
: Upon getting it to that stage, I noticed a bug.  When executing t/op.undef
: it fails on test 20.  This tests the defined(...) operator to test the
: existence of a function.  It always returns FALSE (or whatever FALSE is
: in PERL).  I have not had the opportunity to delve into the source to 
: submit a quick patch for any SCO UNIX sites out there.  All other tests
: worked (except for op.dbm).
: 
: I have been having another problem on EVERY perl system dealing with
: packages, but that is a different subject, and I need to do more testing
: before I post anything on it.

Don't work too hard on it till the next patch comes out, which may affect
what you're doing.

: Any idea on why defined(&fcn) is broken?  Comments, Larry?

I imagine your compile is hiccuping on the lines in consarg.c that say

	if ((arg->arg_type == O_DEFINED || arg->arg_type == O_UNDEF) &&
          (arg1->arg_type == (perldb ? O_DBSUBR : O_SUBR)) ) {
            arg[1].arg_type |= A_DONT;
        }

Try simplifying that and see if it works better.  If the conditional is
false when it should be true, it'll end up calling the function and
checking to see if the return value is defined instead of checking to
see if the routine is defined.  (The A_DONT flag suppresses evaluation.)

Larry