line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::Class; |
2
|
30
|
|
|
30
|
|
163
|
use strict; |
|
30
|
|
|
|
|
63
|
|
|
30
|
|
|
|
|
806
|
|
3
|
30
|
|
|
30
|
|
161
|
use warnings; |
|
30
|
|
|
|
|
60
|
|
|
30
|
|
|
|
|
827
|
|
4
|
|
|
|
|
|
|
|
5
|
30
|
|
|
30
|
|
1011
|
use Test::Stream::Plugin; |
|
30
|
|
|
|
|
59
|
|
|
30
|
|
|
|
|
225
|
|
6
|
|
|
|
|
|
|
|
7
|
30
|
|
|
30
|
|
170
|
use Test::Stream::Util qw/pkg_to_file/; |
|
30
|
|
|
|
|
70
|
|
|
30
|
|
|
|
|
219
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub load_ts_plugin { |
10
|
33
|
|
|
33
|
0
|
88
|
my $class = shift; |
11
|
33
|
|
|
|
|
86
|
my ($caller, $load) = @_; |
12
|
|
|
|
|
|
|
|
13
|
33
|
100
|
|
|
|
163
|
die "No module specified for 'Class' plugin at $caller->[1] line $caller->[2].\n" |
14
|
|
|
|
|
|
|
unless $load; |
15
|
|
|
|
|
|
|
|
16
|
31
|
|
|
|
|
126
|
my $file = pkg_to_file($load); |
17
|
31
|
|
|
|
|
956
|
my $ok = eval qq|# line $caller->[2] "$caller->[1]"\nrequire \$file; 1|; |
18
|
31
|
100
|
|
|
|
1032
|
die $@ unless $ok; |
19
|
|
|
|
|
|
|
|
20
|
30
|
|
|
30
|
|
170
|
no strict 'refs'; |
|
30
|
|
|
|
|
63
|
|
|
30
|
|
|
|
|
3327
|
|
21
|
29
|
|
|
|
|
75
|
*{$caller->[0] . '::CLASS'} = \$load; |
|
29
|
|
|
|
|
178
|
|
22
|
29
|
|
|
9
|
|
122
|
*{$caller->[0] . '::CLASS'} = sub { $load }; |
|
29
|
|
|
|
|
206
|
|
|
9
|
|
|
|
|
120
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |