line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::Exception; |
2
|
95
|
|
|
95
|
|
656
|
use strict; |
|
95
|
|
|
|
|
91
|
|
|
95
|
|
|
|
|
2164
|
|
3
|
95
|
|
|
95
|
|
354
|
use warnings; |
|
95
|
|
|
|
|
99
|
|
|
95
|
|
|
|
|
1994
|
|
4
|
|
|
|
|
|
|
|
5
|
95
|
|
|
95
|
|
303
|
use Test::Stream::Util qw/try/; |
|
95
|
|
|
|
|
90
|
|
|
95
|
|
|
|
|
435
|
|
6
|
95
|
|
|
95
|
|
344
|
use Carp qw/croak/; |
|
95
|
|
|
|
|
103
|
|
|
95
|
|
|
|
|
4546
|
|
7
|
|
|
|
|
|
|
|
8
|
95
|
|
|
95
|
|
317
|
use Test::Stream::Exporter qw/import default_exports/; |
|
95
|
|
|
|
|
90
|
|
|
95
|
|
|
|
|
364
|
|
9
|
|
|
|
|
|
|
default_exports qw/lives dies/; |
10
|
95
|
|
|
95
|
|
331
|
no Test::Stream::Exporter; |
|
95
|
|
|
|
|
98
|
|
|
95
|
|
|
|
|
246
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub lives(&) { |
13
|
20
|
|
|
20
|
1
|
60
|
my $code = shift; |
14
|
20
|
|
|
|
|
54
|
my ($ok, $err) = &try($code); |
15
|
20
|
100
|
|
|
|
99
|
return 1 if $ok; |
16
|
2
|
|
|
|
|
17
|
warn $err; |
17
|
2
|
|
|
|
|
8
|
return 0; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub dies(&) { |
21
|
220
|
|
|
220
|
1
|
1045
|
my $code = shift; |
22
|
220
|
|
|
|
|
593
|
my ($ok, $err) = &try($code); |
23
|
220
|
100
|
|
|
|
505
|
return undef if $ok; |
24
|
218
|
|
|
|
|
1670
|
return $err; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |