line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::Exception; |
2
|
95
|
|
|
95
|
|
1002
|
use strict; |
|
95
|
|
|
|
|
8262
|
|
|
95
|
|
|
|
|
2531
|
|
3
|
95
|
|
|
95
|
|
514
|
use warnings; |
|
95
|
|
|
|
|
159
|
|
|
95
|
|
|
|
|
2684
|
|
4
|
|
|
|
|
|
|
|
5
|
95
|
|
|
95
|
|
477
|
use Test::Stream::Util qw/try/; |
|
95
|
|
|
|
|
170
|
|
|
95
|
|
|
|
|
615
|
|
6
|
95
|
|
|
95
|
|
530
|
use Carp qw/croak/; |
|
95
|
|
|
|
|
164
|
|
|
95
|
|
|
|
|
5579
|
|
7
|
|
|
|
|
|
|
|
8
|
95
|
|
|
95
|
|
489
|
use Test::Stream::Exporter; |
|
95
|
|
|
|
|
318
|
|
|
95
|
|
|
|
|
566
|
|
9
|
|
|
|
|
|
|
default_exports qw/lives dies/; |
10
|
95
|
|
|
95
|
|
492
|
no Test::Stream::Exporter; |
|
95
|
|
|
|
|
172
|
|
|
95
|
|
|
|
|
366
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub lives(&) { |
13
|
20
|
|
|
20
|
1
|
91
|
my $code = shift; |
14
|
20
|
|
|
|
|
78
|
my ($ok, $err) = &try($code); |
15
|
20
|
100
|
|
|
|
143
|
return 1 if $ok; |
16
|
2
|
|
|
|
|
21
|
warn $err; |
17
|
2
|
|
|
|
|
12
|
return 0; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub dies(&) { |
21
|
220
|
|
|
220
|
1
|
1082
|
my $code = shift; |
22
|
220
|
|
|
|
|
828
|
my ($ok, $err) = &try($code); |
23
|
220
|
100
|
|
|
|
693
|
return undef if $ok; |
24
|
218
|
|
|
|
|
1757
|
return $err; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |