line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Plugin::Capabilities; |
2
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
3
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
10
|
use Test::Stream::Capabilities; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
22
|
|
6
|
2
|
|
|
2
|
|
9
|
use Test::Stream::Plugin; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
9
|
use Carp qw/croak/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
296
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub load_ts_plugin { |
11
|
2
|
|
|
2
|
0
|
6
|
my $class = shift; |
12
|
2
|
|
|
|
|
5
|
my ($caller, @args) = @_; |
13
|
|
|
|
|
|
|
|
14
|
2
|
50
|
|
|
|
10
|
@args = (qw/CAN_THREAD CAN_FORK/) unless @args; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
5
|
for my $arg (@args) { |
17
|
4
|
50
|
33
|
|
|
59
|
croak "$arg is not a valid capabilties check" |
18
|
|
|
|
|
|
|
unless $arg =~ m/^CAN_/ && Test::Stream::Capabilities->can($arg); |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
14
|
my $const = Test::Stream::Capabilities::get_const($arg); |
21
|
2
|
|
|
2
|
|
9
|
no strict 'refs'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
146
|
|
22
|
4
|
|
|
|
|
6
|
*{"$caller->[0]\::$arg"} = $const; |
|
4
|
|
|
|
|
30
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |