line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Switch::Plain; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
86437
|
use v5.14.0; |
|
4
|
|
|
|
|
14
|
|
4
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
127
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
21
|
use Carp qw(croak); |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
377
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
20
|
use XSLoader; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
162
|
|
9
|
|
|
|
|
|
|
BEGIN { |
10
|
4
|
|
|
4
|
|
10
|
our $VERSION = '0.04'; |
11
|
4
|
|
|
|
|
3498
|
XSLoader::load; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my %export = ( |
15
|
|
|
|
|
|
|
sswitch => FLAG_SSWITCH, |
16
|
|
|
|
|
|
|
nswitch => FLAG_NSWITCH, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _port { |
20
|
4
|
|
|
4
|
|
9
|
my $op = shift; |
21
|
|
|
|
|
|
|
|
22
|
4
|
|
|
|
|
8
|
my $class = shift; |
23
|
|
|
|
|
|
|
|
24
|
4
|
|
|
|
|
8
|
my @todo; |
25
|
4
|
|
|
|
|
10
|
for my $item (@_) { |
26
|
0
|
|
0
|
|
|
0
|
push @todo, $export{$item} || croak qq{"$item" is not exported by the $class module}; |
27
|
|
|
|
|
|
|
} |
28
|
4
|
50
|
|
|
|
26
|
for my $item (@todo ? @todo : values %export) { |
29
|
8
|
|
|
|
|
29
|
$op->(\$^H{+HINTK_FLAGS}, $item); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub import { |
34
|
8
|
|
|
8
|
|
13
|
_port sub { ${$_[0]} |= $_[1]; }, @_; |
|
8
|
|
|
4
|
|
6294
|
|
|
4
|
|
|
|
|
42
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub unimport { |
38
|
0
|
|
|
0
|
|
|
_port sub { ${$_[0]} &= ~$_[1]; }, @_; |
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
'ok' |
42
|
|
|
|
|
|
|
__END__ |