line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Die; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
119
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
#NOTE: To get stat(_), do stat(\*_). |
6
|
|
|
|
|
|
|
sub stat { |
7
|
7
|
|
|
7
|
0
|
1931
|
my ( $NS, $path_or_fh ) = @_; |
8
|
|
|
|
|
|
|
|
9
|
7
|
|
|
|
|
37
|
local ( $!, $^E ); |
10
|
|
|
|
|
|
|
|
11
|
7
|
50
|
|
|
|
156
|
my $ret = wantarray ? [ CORE::stat($path_or_fh) ] : CORE::stat($path_or_fh); |
12
|
|
|
|
|
|
|
|
13
|
7
|
50
|
|
|
|
30
|
if ($^E) { |
14
|
0
|
0
|
|
|
|
0
|
if ( __is_a_fh($path_or_fh) ) { |
15
|
0
|
|
|
|
|
0
|
$NS->__THROW('Stat'); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
0
|
$NS->__THROW( 'Stat', path => $path_or_fh ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
7
|
50
|
|
|
|
53
|
return wantarray ? @$ret : $ret; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |