line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::Event; |
2
|
155
|
|
|
155
|
|
1070
|
use strict; |
|
155
|
|
|
|
|
298
|
|
|
155
|
|
|
|
|
5306
|
|
3
|
155
|
|
|
155
|
|
870
|
use warnings; |
|
155
|
|
|
|
|
306
|
|
|
155
|
|
|
|
|
6319
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000156'; |
6
|
|
|
|
|
|
|
|
7
|
155
|
|
|
155
|
|
930
|
use Test2::Util qw/pkg_to_file/; |
|
155
|
|
|
|
|
333
|
|
|
155
|
|
|
|
|
8847
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = qw/gen_event/; |
10
|
155
|
|
|
155
|
|
1335
|
use base 'Exporter'; |
|
155
|
|
|
|
|
465
|
|
|
155
|
|
|
|
|
39818
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub gen_event { |
13
|
2
|
|
|
2
|
1
|
35
|
my ($type, %fields) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
100
|
|
|
|
14
|
$type = "Test2::Event::$type" unless $type =~ s/^\+//; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
9
|
require(pkg_to_file($type)); |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
33
|
|
|
69
|
$fields{trace} ||= Test2::Util::Trace->new(frame => [caller(0)]); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
73
|
return $type->new(%fields); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |