line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::WantXS; |
2
|
1
|
|
|
1
|
|
13212
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
3
|
1
|
|
|
1
|
|
2
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
4
|
1
|
|
|
1
|
|
2
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
5
|
1
|
|
|
1
|
|
365
|
use parent qw/Exporter/; |
|
1
|
|
|
|
|
211
|
|
|
1
|
|
|
|
|
3
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw/want_xs/; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $_CACHE; |
10
|
|
|
|
|
|
|
sub want_xs { |
11
|
12
|
|
|
12
|
1
|
4105
|
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
|
|
|
|
26
|
$default = !$ENV{PERL_ONLY} if not defined $default; |
17
|
|
|
|
|
|
|
|
18
|
12
|
|
|
|
|
15
|
for my $arg(@ARGV){ |
19
|
8
|
100
|
|
|
|
20
|
if($arg eq '--pp'){ |
|
|
50
|
|
|
|
|
|
20
|
4
|
|
|
|
|
8
|
return $_CACHE = 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
elsif($arg eq '--xs'){ |
23
|
4
|
|
|
|
|
7
|
return $_CACHE = 1; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
4
|
|
|
|
|
7
|
return $_CACHE = $default; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |