blib/lib/IO/Die/opendir.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 8 | 87.5 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 10 | 13 | 76.9 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package IO::Die; | ||||||
2 | |||||||
3 | 1 | 1 | 4 | use strict; | |||
1 | 5 | ||||||
1 | 116 | ||||||
4 | |||||||
5 | sub opendir { | ||||||
6 | 1 | 1 | 0 | 4 | my ( $NS, $dir ) = ( shift, @_[ 1 .. $#_ ] ); | ||
7 | |||||||
8 | #https://github.com/pjcj/Devel--Cover/issues/125 | ||||||
9 | #my ( $NS, $dh_r, $dir ) = ( shift, \shift, shift ); | ||||||
10 | |||||||
11 | 1 | 5 | local ( $!, $^E ); | ||||
12 | 1 | 50 | 40 | my $ok = CORE::opendir( $_[0], $dir ) or do { | |||
13 | 0 | 0 | $NS->__THROW( 'DirectoryOpen', path => $dir ); | ||||
14 | }; | ||||||
15 | |||||||
16 | 1 | 6 | return $ok; | ||||
17 | } | ||||||
18 | |||||||
19 | 1; |