Subject: | Term-Screen v1.03: exit() function always returns 0 |
Date: | Mon, 2 Sep 2013 01:40:36 +0000 |
To: | "bug-Term-Screen [...] rt.cpan.org" <bug-term-screen [...] rt.cpan.org> |
From: | david b <davidb_tai [...] hotmail.com> |
Hi,
With Term-Screen v1.03, exit() function always returns 0 after "$scr = new Term::Screen";
you can reproduce this bug:
$ cat termScreen.pl
#!/usr/bin/perl
use strict;
use warnings;
use Term::Screen;
my $scr = new Term::Screen;
exit 100;
$ perl termScreen.pl
$ echo $?
0
It seems to be a bug with DESTROY method.
after:
sub DESTROY
{
#eval {system('stty -raw echo')};
}
$ perl termScreen.pl
$ echo $?
100
CYGWIN_NT-6.1 WKS 1.7.24(0.269/5/3) 2013-08-15 11:59 x86_64 Cygwin
perl v5.14.4
Term-Screen v1.03