line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::Event; |
2
|
154
|
|
|
154
|
|
1001
|
use strict; |
|
154
|
|
|
|
|
298
|
|
|
154
|
|
|
|
|
4110
|
|
3
|
154
|
|
|
154
|
|
814
|
use warnings; |
|
154
|
|
|
|
|
311
|
|
|
154
|
|
|
|
|
6211
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000153'; |
6
|
|
|
|
|
|
|
|
7
|
154
|
|
|
154
|
|
792
|
use Test2::Util qw/pkg_to_file/; |
|
154
|
|
|
|
|
320
|
|
|
154
|
|
|
|
|
8389
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = qw/gen_event/; |
10
|
154
|
|
|
154
|
|
936
|
use base 'Exporter'; |
|
154
|
|
|
|
|
436
|
|
|
154
|
|
|
|
|
34918
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub gen_event { |
13
|
2
|
|
|
2
|
1
|
33
|
my ($type, %fields) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
100
|
|
|
|
12
|
$type = "Test2::Event::$type" unless $type =~ s/^\+//; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
8
|
require(pkg_to_file($type)); |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
33
|
|
|
61
|
$fields{trace} ||= Test2::Util::Trace->new(frame => [caller(0)]); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
66
|
return $type->new(%fields); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |