bug in Cygwin perl 5.6.1?
Rhet Turnbull
RhetTbull@hotmail.com
Sat Feb 2 14:58:00 GMT 2002
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@familiehaase.de>
To: "Rhet Turnbull" <rhetlist@yahoo.com>; <rhetlist@yahoo.com>;
<cygwin@cygwin.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/
More information about the Cygwin
mailing list