File Coverage

blib/lib/IO/Die/close.pm
Criterion Covered Total %
statement 8 8 100.0
branch 4 4 100.0
condition n/a
subroutine 2 2 100.0
pod 0 1 0.0
total 14 15 93.3


line stmt bran cond sub pod time code
1             package IO::Die;
2              
3 1     1   4 use strict;
  1         1  
  1         90  
4              
5             sub close {
6 6     6 0 5595 my ( $NS, $fh ) = @_;
7              
8 6         37 local ( $!, $^E );
9 6 100       55 my $ok = ( $fh ? CORE::close($fh) : CORE::close() ) or do {
    100          
10 2         10 $NS->__THROW('Close');
11             };
12              
13 4         22 return $ok;
14             }
15              
16             1;