line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Diag; |
2
|
107
|
|
|
107
|
|
658
|
use strict; |
|
107
|
|
|
|
|
116
|
|
|
107
|
|
|
|
|
2403
|
|
3
|
107
|
|
|
107
|
|
307
|
use warnings; |
|
107
|
|
|
|
|
326
|
|
|
107
|
|
|
|
|
2050
|
|
4
|
|
|
|
|
|
|
|
5
|
107
|
|
|
107
|
|
312
|
use base 'Test::Stream::Event'; |
|
107
|
|
|
|
|
95
|
|
|
107
|
|
|
|
|
38346
|
|
6
|
107
|
|
|
107
|
|
464
|
use Test::Stream::HashBase accessors => [qw/message/]; |
|
107
|
|
|
|
|
120
|
|
|
107
|
|
|
|
|
391
|
|
7
|
|
|
|
|
|
|
|
8
|
107
|
|
|
107
|
|
418
|
use Carp qw/confess/; |
|
107
|
|
|
|
|
117
|
|
|
107
|
|
|
|
|
4016
|
|
9
|
|
|
|
|
|
|
|
10
|
107
|
|
|
107
|
|
385
|
use Test::Stream::Formatter::TAP qw/OUT_TODO OUT_ERR/; |
|
107
|
|
|
|
|
117
|
|
|
107
|
|
|
|
|
532
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub init { |
13
|
28
|
|
|
28
|
0
|
118
|
$_[0]->SUPER::init(); |
14
|
28
|
100
|
|
|
|
66
|
if (defined $_[0]->{+MESSAGE}) { |
15
|
26
|
|
|
|
|
67
|
$_[0]->{+MESSAGE} .= ""; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
else { |
18
|
2
|
|
|
|
|
5
|
$_[0]->{+MESSAGE} = 'undef'; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub to_tap { |
23
|
13
|
|
|
13
|
1
|
29
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
13
|
|
|
|
|
16
|
my $msg = $self->{+MESSAGE}; |
26
|
13
|
100
|
|
|
|
26
|
return unless $msg; |
27
|
|
|
|
|
|
|
|
28
|
12
|
100
|
|
|
|
34
|
$msg = "# $msg" unless $msg eq "\n"; |
29
|
|
|
|
|
|
|
|
30
|
12
|
|
|
|
|
19
|
chomp($msg); |
31
|
12
|
|
|
|
|
36
|
$msg =~ s/\n/\n# /g; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return [ |
34
|
12
|
100
|
|
|
|
29
|
($self->{+DEBUG}->no_diag ? OUT_TODO : OUT_ERR), |
35
|
|
|
|
|
|
|
"$msg\n", |
36
|
|
|
|
|
|
|
]; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |