delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/02/17:58:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [216.126.162.41]
From: "Rhet Turnbull" <RhetTbull AT hotmail DOT com>
To: <gerrit AT familiehaase DOT de>
Cc: <cygwin AT cygwin DOT com>
References: <3C5C76A0 DOT 24107 DOT 25783F5 AT localhost>
Subject: Re: bug in Cygwin perl 5.6.1?
Date: Sat, 2 Feb 2002 17:58:18 -0500
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <LAW2-OE14zjwakzNFfh00000a63@hotmail.com>
X-OriginalArrivalTime: 02 Feb 2002 22:58:37.0835 (UTC) FILETIME=[264875B0:01C1AC3D]

Gerrit P. Haase wrote:
> Why?  Where is docu about this?

The perl documentation for $^S in the perlvar manpage states:

$^S     Current state of the interpreter.  Undefined if
        parsing of the current module/eval is not finished
        (may happen in $SIG{__DIE__} and $SIG{__WARN__}
        handlers).  True if inside an eval(), otherwise
        false.

The "True if inside an eval(), otherwise false" is what I was getting at.  I
ran into this since I was writing a custom SIG{__DIE__} handler (which needs
to know if you're inside an eval where die is an exception catching
mechanism or in normal code where die means to exit with error.)  The bug is
that after executing an eval(), $^S stays true even though it should be
false outside the scope of the eval.

I reported this to perlbug and they've acknowledged that it's a known bug
that will be fixed in next release.

Regards,

--Rhet



----- Original Message -----
From: "Gerrit P. Haase" <gerrit AT familiehaase DOT de>
To: "Rhet Turnbull" <rhetlist AT yahoo DOT com>; <rhetlist AT yahoo DOT com>;
<cygwin AT cygwin DOT com>
Sent: Saturday, February 02, 2002 5:30 PM
Subject: Re: bug in Cygwin perl 5.6.1?


> Am 31 Jan 2002 um 9:21 hat Rhet Turnbull geschrieben:
>
> >There seems to be a bug in Cygwin's perl (5.6.1). The
> >following code:
> >
> >perl -e 'print $^S || 0;eval {print $^S || 0}; print
> >$^S || 0;'
> >
> >should produce '010'
>
> Why?  Where is docu about this?
> Thanks
>
> Gerrit
>
> >However, on Cygwin perl 5.6.1, it produces 011.  This
> >means that perl incorrectly thinks it's in an eval
> >block when it's not.  I've checked this on perl v5.6.1
> >for other platforms (including Win32) and it seems to
> >work fine.
> --
> =^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019