line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::WantXS; |
2
|
1
|
|
|
1
|
|
35426
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
1022
|
use parent qw/Exporter/; |
|
1
|
|
|
|
|
384
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw/want_xs/; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $_CACHE; |
10
|
|
|
|
|
|
|
sub want_xs { |
11
|
12
|
|
|
12
|
1
|
3805
|
my($self, $default) = @_; |
12
|
12
|
50
|
|
|
|
29
|
return $_CACHE if defined $_CACHE; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# you're using this module, you must want XS by default |
15
|
|
|
|
|
|
|
# unless PERL_ONLY is true. |
16
|
12
|
50
|
|
|
|
31
|
$default = !$ENV{PERL_ONLY} if not defined $default; |
17
|
|
|
|
|
|
|
|
18
|
12
|
|
|
|
|
22
|
for my $arg(@ARGV){ |
19
|
8
|
100
|
|
|
|
25
|
if($arg eq '--pp'){ |
|
|
50
|
|
|
|
|
|
20
|
4
|
|
|
|
|
11
|
return $_CACHE = 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
elsif($arg eq '--xs'){ |
23
|
4
|
|
|
|
|
10
|
return $_CACHE = 1; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
4
|
|
|
|
|
12
|
return $_CACHE = $default; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |