line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::Class; |
2
|
30
|
|
|
30
|
|
105
|
use strict; |
|
30
|
|
|
|
|
35
|
|
|
30
|
|
|
|
|
728
|
|
3
|
30
|
|
|
30
|
|
91
|
use warnings; |
|
30
|
|
|
|
|
33
|
|
|
30
|
|
|
|
|
635
|
|
4
|
|
|
|
|
|
|
|
5
|
30
|
|
|
30
|
|
392
|
use Test::Stream::Plugin qw/import/; |
|
30
|
|
|
|
|
35
|
|
|
30
|
|
|
|
|
152
|
|
6
|
|
|
|
|
|
|
|
7
|
30
|
|
|
30
|
|
113
|
use Test::Stream::Util qw/pkg_to_file/; |
|
30
|
|
|
|
|
37
|
|
|
30
|
|
|
|
|
127
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub load_ts_plugin { |
10
|
33
|
|
|
33
|
0
|
57
|
my $class = shift; |
11
|
33
|
|
|
|
|
54
|
my ($caller, $load) = @_; |
12
|
|
|
|
|
|
|
|
13
|
33
|
100
|
|
|
|
101
|
die "No module specified for 'Class' plugin at $caller->[1] line $caller->[2].\n" |
14
|
|
|
|
|
|
|
unless $load; |
15
|
|
|
|
|
|
|
|
16
|
31
|
|
|
|
|
80
|
my $file = pkg_to_file($load); |
17
|
31
|
|
|
|
|
741
|
my $ok = eval qq|# line $caller->[2] "$caller->[1]"\nrequire \$file; 1|; |
18
|
31
|
100
|
|
|
|
623
|
die $@ unless $ok; |
19
|
|
|
|
|
|
|
|
20
|
30
|
|
|
30
|
|
124
|
no strict 'refs'; |
|
30
|
|
|
|
|
37
|
|
|
30
|
|
|
|
|
2190
|
|
21
|
29
|
|
|
|
|
47
|
*{$caller->[0] . '::CLASS'} = \$load; |
|
29
|
|
|
|
|
110
|
|
22
|
29
|
|
|
9
|
|
83
|
*{$caller->[0] . '::CLASS'} = sub { $load }; |
|
29
|
|
|
|
|
136
|
|
|
9
|
|
|
|
|
79
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |