line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event; |
2
|
107
|
|
|
107
|
|
1339
|
use strict; |
|
107
|
|
|
|
|
204
|
|
|
107
|
|
|
|
|
2600
|
|
3
|
107
|
|
|
107
|
|
495
|
use warnings; |
|
107
|
|
|
|
|
183
|
|
|
107
|
|
|
|
|
2820
|
|
4
|
|
|
|
|
|
|
|
5
|
107
|
|
|
107
|
|
497
|
use Carp qw/confess/; |
|
107
|
|
|
|
|
202
|
|
|
107
|
|
|
|
|
5692
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Test::Stream::HashBase( |
8
|
107
|
|
|
|
|
947
|
accessors => [qw/debug nested/], |
9
|
107
|
|
|
107
|
|
560
|
); |
|
107
|
|
|
|
|
258
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
967
|
|
|
967
|
|
2524
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Import should only when event is imported, subclasses do not use this |
15
|
|
|
|
|
|
|
# import. |
16
|
967
|
100
|
|
|
|
11915
|
return if $class ne __PACKAGE__; |
17
|
|
|
|
|
|
|
|
18
|
788
|
|
|
|
|
1337
|
my $caller = caller; |
19
|
788
|
|
|
|
|
2059
|
my (%args) = @_; |
20
|
|
|
|
|
|
|
|
21
|
788
|
|
100
|
|
|
2684
|
my $accessors = $args{accessors} || []; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# %args may override base |
24
|
788
|
|
|
|
|
4662
|
Test::Stream::HashBase->import(into => $caller, base => $class, %args); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub init { |
28
|
543
|
100
|
|
543
|
0
|
3188
|
confess("No debug info provided!") unless $_[0]->{+DEBUG}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
3
|
|
|
3
|
1
|
22
|
sub causes_fail { 0 } |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
1
|
13
|
sub to_tap {()}; |
34
|
49
|
|
|
49
|
1
|
116
|
sub update_state {()}; |
35
|
3234
|
|
|
3234
|
1
|
7311
|
sub terminate {()}; |
36
|
3160
|
|
|
3160
|
1
|
9994
|
sub global {()}; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |