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

Re: [MacPerl] use diagnostics always crashes hard



Michael Schuerig <uzs90z@ibm.rhrz.uni-bonn.de> writes
>Trying to write clean scripts I make use of the -w switch and tried to
>use diagnostics. -w is okay, but using the diagnostics module without
>exception leads to a crash not event MacsBug is able to survive (rs give
>"MacsBug caused the exception"). (My system is a PM7500/100 with
>Mac OS 8.)

well the following works for me (7200, MacOS 8, MacPerl 5.1.4b2), modulo
that the default memory partition is too small, and that this script
highlights bugs (I think) in handling of prototypes [not specific to
MacPerl]

#!/usr/local/bin/perl -w
use diagnostics;
use strict;

sub foo1 ($$);
foo1 "s";      #  <= prototype mismatch error; expected

sub foo2 ($\%);
foo2 "s";      #  <= no warning/error; expected?

sub foo3 ($\@);
foo3 "s";      #  <= no warning/error; expected?

sub foo4 ($\%\@\%);
foo4 "s";      #  <= no warning/error; expected?

sub foo5 ($@\%);
foo5 "s", 4, 6, 7;  #  valid

sub foo6 ();
foo6;     # <= valid
foo6 "s"; # <= error about missing operator or term; expected



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