line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Note; |
2
|
107
|
|
|
107
|
|
685
|
use strict; |
|
107
|
|
|
|
|
117
|
|
|
107
|
|
|
|
|
2495
|
|
3
|
107
|
|
|
107
|
|
321
|
use warnings; |
|
107
|
|
|
|
|
116
|
|
|
107
|
|
|
|
|
2286
|
|
4
|
|
|
|
|
|
|
|
5
|
107
|
|
|
107
|
|
333
|
use Test::Stream::Formatter::TAP qw/OUT_STD/; |
|
107
|
|
|
|
|
104
|
|
|
107
|
|
|
|
|
529
|
|
6
|
|
|
|
|
|
|
|
7
|
107
|
|
|
107
|
|
397
|
use base 'Test::Stream::Event'; |
|
107
|
|
|
|
|
137
|
|
|
107
|
|
|
|
|
6833
|
|
8
|
107
|
|
|
107
|
|
427
|
use Test::Stream::HashBase accessors => [qw/message/]; |
|
107
|
|
|
|
|
129
|
|
|
107
|
|
|
|
|
604
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
22
|
|
|
22
|
0
|
99
|
$_[0]->SUPER::init(); |
12
|
22
|
100
|
|
|
|
52
|
if (defined $_[0]->{+MESSAGE}) { |
13
|
21
|
|
|
|
|
56
|
$_[0]->{+MESSAGE} .= ""; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
else { |
16
|
1
|
|
|
|
|
3
|
$_[0]->{+MESSAGE} = 'undef'; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub to_tap { |
21
|
10
|
|
|
10
|
1
|
25
|
my $self = shift; |
22
|
|
|
|
|
|
|
|
23
|
10
|
|
|
|
|
23
|
chomp(my $msg = $self->{+MESSAGE}); |
24
|
10
|
100
|
|
|
|
27
|
return unless $msg; |
25
|
8
|
100
|
|
|
|
36
|
$msg = "# $msg" unless $msg =~ m/^\n/; |
26
|
8
|
|
|
|
|
22
|
$msg =~ s/\n/\n# /g; |
27
|
|
|
|
|
|
|
|
28
|
8
|
|
|
|
|
42
|
return [OUT_STD, "$msg\n"]; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |