line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::Event; |
2
|
155
|
|
|
155
|
|
1029
|
use strict; |
|
155
|
|
|
|
|
343
|
|
|
155
|
|
|
|
|
4342
|
|
3
|
155
|
|
|
155
|
|
805
|
use warnings; |
|
155
|
|
|
|
|
370
|
|
|
155
|
|
|
|
|
6936
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000155'; |
6
|
|
|
|
|
|
|
|
7
|
155
|
|
|
155
|
|
900
|
use Test2::Util qw/pkg_to_file/; |
|
155
|
|
|
|
|
336
|
|
|
155
|
|
|
|
|
8770
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = qw/gen_event/; |
10
|
155
|
|
|
155
|
|
1039
|
use base 'Exporter'; |
|
155
|
|
|
|
|
373
|
|
|
155
|
|
|
|
|
38324
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub gen_event { |
13
|
2
|
|
|
2
|
1
|
30
|
my ($type, %fields) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
100
|
|
|
|
13
|
$type = "Test2::Event::$type" unless $type =~ s/^\+//; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
8
|
require(pkg_to_file($type)); |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
33
|
|
|
69
|
$fields{trace} ||= Test2::Util::Trace->new(frame => [caller(0)]); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
75
|
return $type->new(%fields); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |