line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Diag; |
2
|
107
|
|
|
107
|
|
1173
|
use strict; |
|
107
|
|
|
|
|
196
|
|
|
107
|
|
|
|
|
2620
|
|
3
|
107
|
|
|
107
|
|
509
|
use warnings; |
|
107
|
|
|
|
|
177
|
|
|
107
|
|
|
|
|
3343
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Test::Stream::Event( |
6
|
107
|
|
|
|
|
537
|
accessors => [qw/message/], |
7
|
107
|
|
|
107
|
|
55026
|
); |
|
107
|
|
|
|
|
269
|
|
8
|
|
|
|
|
|
|
|
9
|
107
|
|
|
107
|
|
593
|
use Carp qw/confess/; |
|
107
|
|
|
|
|
204
|
|
|
107
|
|
|
|
|
4876
|
|
10
|
|
|
|
|
|
|
|
11
|
107
|
|
|
107
|
|
585
|
use Test::Stream::Formatter::TAP qw/OUT_TODO OUT_ERR/; |
|
107
|
|
|
|
|
190
|
|
|
107
|
|
|
|
|
795
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init { |
14
|
28
|
|
|
28
|
0
|
183
|
$_[0]->SUPER::init(); |
15
|
28
|
100
|
|
|
|
108
|
if (defined $_[0]->{+MESSAGE}) { |
16
|
26
|
|
|
|
|
97
|
$_[0]->{+MESSAGE} .= ""; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else { |
19
|
2
|
|
|
|
|
7
|
$_[0]->{+MESSAGE} = 'undef'; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub to_tap { |
24
|
13
|
|
|
13
|
1
|
43
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
13
|
|
|
|
|
25
|
my $msg = $self->{+MESSAGE}; |
27
|
13
|
100
|
|
|
|
33
|
return unless $msg; |
28
|
|
|
|
|
|
|
|
29
|
12
|
100
|
|
|
|
47
|
$msg = "# $msg" unless $msg eq "\n"; |
30
|
|
|
|
|
|
|
|
31
|
12
|
|
|
|
|
31
|
chomp($msg); |
32
|
12
|
|
|
|
|
51
|
$msg =~ s/\n/\n# /g; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
return [ |
35
|
12
|
100
|
|
|
|
45
|
($self->{+DEBUG}->no_diag ? OUT_TODO : OUT_ERR), |
36
|
|
|
|
|
|
|
"$msg\n", |
37
|
|
|
|
|
|
|
]; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |