[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Big weirdness in MacPerl 5.1.4r4



Angus McIntyre <angus@pobox.com> writes:
>Apologies if these are recently-asked questions ... I've just rejoined the
>MacPerl list, so if everyone's been hotly debating this for the past week,
>well, I haven't seen it. Anyway ...

Welcome back! None of these issues have been brought up so far.

>It looks to me as if two things (at least) have changed:
>
>   1. A construct of the form:
>
>         LABEL: {
>            &foo, last LABEL if $bar;
>            &baz, last LABEL if $quux;
>         }
>
>      No longer returns a value. Previously, if '$bar' was true, then
>      the value of this construct would have been whatever was returned
>      by '&foo'. This seems no longer to be the case.

I did some tests with this, and it seems to me that the fact that this
construct worked for you was purely coincidental. I will run this code by a few
Perl deities tonight and will let them decide whether it was reasonable to
expect a value being returned in the first place.

I doubt that, if this were considered a bug, it would be mine to fix anyway.

>   2. Something has happened to I/O redirection. I use constructs of the
>      form:
>
>         open(STDOUT,">foo) || die "can't open 'foo': $!";
>	 ... call subroutines ...
>         close(STDOUT);

This is an interesting and serious bug. Between 513 and 514, I switched I/O
libraries, and perl always had a tricky balancing act between I/O streams, file
descriptors, and Perl streams; I wouldn't be surprised if that went wrong in
some places.

Can you distill this bug into a short test case?

>   3. I also managed to crash MacPerl completely by hitting Cmd-.; like
>      a fool, I forgot to take a Macsbug dump of the result, but I will
>      next time if I manage to reproduce the error.

Please do so.

>Have I had a brain haemorrhage, or has MacPerl? I thought all these things
>were legal, but perhaps this is sloppy code which MacPerl has now tightened
>up on. If so, please let me down gently ...

1) might have been a silent change in the Perl core to behaviour that might
never have been intended to work in the first place. Since returning a value
from such a block is a plausible idea, you'll probably get somebody to restore
the previous behaviour.

2) and 3) are definitely bugs in MacPerl.

>And in the meantime, is MacPerl 5.1.3r2 still available anywhere?

My license for Stuffit InstallerMaker has expired, so I'm supposed to hunt down
and kill all remaining installers for 513 and earlier. There are probably a few
left, however, and if necessary, I'll send you a non-installer version of 513.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "I'm set free to find a new illusion" -- Velvet Underground

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch