line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::Class; |
2
|
30
|
|
|
30
|
|
153
|
use strict; |
|
30
|
|
|
|
|
59
|
|
|
30
|
|
|
|
|
905
|
|
3
|
30
|
|
|
30
|
|
149
|
use warnings; |
|
30
|
|
|
|
|
61
|
|
|
30
|
|
|
|
|
807
|
|
4
|
|
|
|
|
|
|
|
5
|
30
|
|
|
30
|
|
1003
|
use Test::Stream::Plugin; |
|
30
|
|
|
|
|
59
|
|
|
30
|
|
|
|
|
206
|
|
6
|
|
|
|
|
|
|
|
7
|
30
|
|
|
30
|
|
165
|
use Test::Stream::Util qw/pkg_to_file/; |
|
30
|
|
|
|
|
59
|
|
|
30
|
|
|
|
|
194
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub load_ts_plugin { |
10
|
33
|
|
|
33
|
0
|
80
|
my $class = shift; |
11
|
33
|
|
|
|
|
88
|
my ($caller, $load) = @_; |
12
|
|
|
|
|
|
|
|
13
|
33
|
100
|
|
|
|
149
|
die "No module specified for 'Class' plugin at $caller->[1] line $caller->[2].\n" |
14
|
|
|
|
|
|
|
unless $load; |
15
|
|
|
|
|
|
|
|
16
|
31
|
|
|
|
|
116
|
my $file = pkg_to_file($load); |
17
|
31
|
|
|
|
|
899
|
my $ok = eval qq|# line $caller->[2] "$caller->[1]"\nrequire \$file; 1|; |
18
|
31
|
100
|
|
|
|
982
|
die $@ unless $ok; |
19
|
|
|
|
|
|
|
|
20
|
30
|
|
|
30
|
|
167
|
no strict 'refs'; |
|
30
|
|
|
|
|
55
|
|
|
30
|
|
|
|
|
3100
|
|
21
|
29
|
|
|
|
|
68
|
*{$caller->[0] . '::CLASS'} = \$load; |
|
29
|
|
|
|
|
170
|
|
22
|
29
|
|
|
9
|
|
116
|
*{$caller->[0] . '::CLASS'} = sub { $load }; |
|
29
|
|
|
|
|
194
|
|
|
9
|
|
|
|
|
113
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |