File Coverage

blib/lib/Win32/Die.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Win32::Die;
2             $VERSION='0.03';
3            
4 1     1   21617 use Term::ReadKey;
  1         4530  
  1         200  
5            
6             $SIG{__DIE__} = sub {
7             # PROMPT is for NT/2000, CMDLINE is for 95/98
8             return unless !defined $ENV{PROMPT}
9             or (defined $ENV{CMDLINE} and $ENV{CMDLINE} eq 'WIN');
10            
11             print shift, "Hit any key to close this window...";
12             ReadMode 4;
13             ReadKey 0;
14             ReadMode 0;
15            
16             exit;
17             }
18            
19             __END__