Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!hp4nl!ruuinf!henkp From: henkp@ruuinf.cs.ruu.nl (Henk P. Penning) Newsgroups: comp.lang.perl Subject: perl crashes in package/eval/reset combination Message-ID: <4543@ruuinf.cs.ruu.nl> Date: 18 Dec 90 21:21:53 GMT Organization: Utrecht University, Dept. of CS Lines: 38 The following program crashes Perl on: Hewlett-Packard 9000/300 running HP/UX 7.0, Harris HCX-9. This is perl, version 3.0 $Header: perly.c,v 3.0.1.9 90/11/10 01:53:26 lwall Locked $ Patch level: 41 --------------------------------------------- sub pr_eval { print STDERR "to eval: $_[0]\n" ; eval $_[0] ; } $i++ ; &pr_eval('package AAP ; $x++ ;') ; &pr_eval('package AAP ; reset("a-z") ;') ; &pr_eval('package AAP ; $x++ ;') ; &pr_eval('package AAP ; reset("a-z") ;') ; --------------------------------------------- On the HPs, the problem goes away if -- $i++ is removed, or -- print STDERR "to eval: $_[0]\n" is removed, or -- the last two lines are removed. On the HCX, perl crashes on the last two lines alone. I need this feature in Jinx. Users type in expressions which must be evaluated in a separate, partially reset context (package). How do other machines behave ? Suggestions for a work-around ? Thanks a lot === HenkP === -- Henk P. Penning, Dept of Computer Science, Utrecht University. Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31-30-534106 e-mail : henkp@cs.ruu.nl (uucp to hp4nl!ruuinf!henkp)