line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event; |
2
|
107
|
|
|
107
|
|
1440
|
use strict; |
|
107
|
|
|
|
|
203
|
|
|
107
|
|
|
|
|
2653
|
|
3
|
107
|
|
|
107
|
|
506
|
use warnings; |
|
107
|
|
|
|
|
187
|
|
|
107
|
|
|
|
|
2746
|
|
4
|
|
|
|
|
|
|
|
5
|
107
|
|
|
107
|
|
502
|
use Carp qw/confess/; |
|
107
|
|
|
|
|
199
|
|
|
107
|
|
|
|
|
5902
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Test::Stream::HashBase( |
8
|
107
|
|
|
|
|
1051
|
accessors => [qw/debug nested/], |
9
|
107
|
|
|
107
|
|
566
|
); |
|
107
|
|
|
|
|
184
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
967
|
|
|
967
|
|
2462
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Import should only when event is imported, subclasses do not use this |
15
|
|
|
|
|
|
|
# import. |
16
|
967
|
100
|
|
|
|
11968
|
return if $class ne __PACKAGE__; |
17
|
|
|
|
|
|
|
|
18
|
788
|
|
|
|
|
1439
|
my $caller = caller; |
19
|
788
|
|
|
|
|
2016
|
my (%args) = @_; |
20
|
|
|
|
|
|
|
|
21
|
788
|
|
100
|
|
|
2752
|
my $accessors = $args{accessors} || []; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# %args may override base |
24
|
788
|
|
|
|
|
4666
|
Test::Stream::HashBase->import(into => $caller, base => $class, %args); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub init { |
28
|
543
|
100
|
|
543
|
0
|
3153
|
confess("No debug info provided!") unless $_[0]->{+DEBUG}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
3
|
|
|
3
|
1
|
20
|
sub causes_fail { 0 } |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
1
|
12
|
sub to_tap {()}; |
34
|
49
|
|
|
49
|
1
|
103
|
sub update_state {()}; |
35
|
3234
|
|
|
3234
|
1
|
7099
|
sub terminate {()}; |
36
|
3160
|
|
|
3160
|
1
|
9776
|
sub global {()}; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |