blib/arch/Config_xs_heavy.pl

filter: Statementstmt 64.9% 50 / 77 Branchbran 66.6% 28 / 42 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 8 / 14 Podpod 90.0% 9 / 10 totaltotal 66.4% 95 / 143 SCAR 41.5
CC
29
Cov
66%
_V
90.0
config_vars
11.0
myconfig
5.1
CRAP 63.4
« xsc_test.pl ↑ Summary blib/arch/Config.pm »
1 # This file was created by Config_xs_heavy.pl.PL.
2  
3 package Config;
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 our %Config;
7  
8 sub bincompat_options {
9 0 ▶ return split ' ', (Internals::V())[0];
Subroutine bincompat_options: not called CC=1 SCAR=6.9
Pod documented
10 }
11  
12 sub non_bincompat_options {
13 0 ▶ return split ' ', (Internals::V())[1];
Subroutine non_bincompat_options: not called CC=1 SCAR=6.9
Pod documented
14 }
15  
16 sub compile_date {
17 0 ▶ return (Internals::V())[2]
Subroutine compile_date: not called CC=1 SCAR=6.9
Pod documented
18 }
19  
20 sub local_patches {
21 0 ▶ my (undef, undef, undef, @patches) = Internals::V();
Subroutine local_patches: not called CC=1 SCAR=6.9
Pod documented
22 0 return @patches;
23 }
24  
25 sub _V {
26 0 ▶ die "Perl lib was built for 'linux' but is being run on '$^O'"
Subroutine _V: not called CC=9 SCAR=45.0
Branch: 1 branch
BranchTrueFalseTotal
unless "linux" eq $^O 0 0 0
27 unless "linux" eq $^O;
28  
29 0 my ($bincompat, $non_bincompat, $date, @patches) = Internals::V();
30  
31 0 my @opts = sort split ' ', "$bincompat $non_bincompat";
32  
33 0 print Config::myconfig();
34 0 print "\nCharacteristics of this binary (from libperl): \n";
35  
36 0 print " Compile-time options:\n";
37 0 print " $_\n" for @opts;
38  
39 0 ▶ if (@patches) {
Branch: 1 branch
BranchTrueFalseTotal
if (@patches) 0 0 0
40 0 print " Locally applied patches:\n";
41 0 print " $_\n" foreach @patches;
42 }
43  
44 0 print " Built under linux\n";
45  
46 0 ▶ print " $date\n" if defined $date;
Branch: 1 branch
BranchTrueFalseTotal
if defined $date 0 0 0
47  
48 0 my @env = map { "$_=\"$ENV{$_}\"" } sort grep {/^PERL/} keys %ENV;
49  
50 0 ▶ if (@env) {
Branch: 1 branch
BranchTrueFalseTotal
if (@env) 0 0 0
51 0 print " \%ENV:\n";
52 0 print " $_\n" foreach @env;
53 }
54 0 print " \@INC:\n";
55 0 print " $_\n" foreach @INC;
56 }
57  
58 sub header_files {
59 0 ▶ return qw(EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h
Subroutine header_files: not called CC=1 SCAR=6.9
Pod documented
60 dosish.h embed.h embedvar.h form.h gv.h handy.h hv.h hv_func.h
61 intrpvar.h iperlsys.h keywords.h mg.h nostdio.h op.h opcode.h
62 pad.h parser.h patchlevel.h perl.h perlio.h perliol.h perlsdio.h
63 perlvars.h perly.h pp.h pp_proto.h proto.h regcomp.h regexp.h
64 regnodes.h scope.h sv.h thread.h time64.h unixish.h utf8.h
65 util.h);
66 }
67  
68 ##
69 ## This file was produced by running the Configure script. It holds all the
70 ## definitions figured out by Configure. Should you modify one of these values,
71 ## do not forget to propagate your changes by running "Configure -der". You may
72 ## instead choose to run each of the .SH files by yourself, or "Configure -S".
73 ##
74 #
75 ## Package name : perl5
76 ## Source directory : .
77 ## Configuration time: Tue Jul 21 15:19:43 UTC 2026
78 ## Configured by : root
79 ## Target system : linux buildkitsandbox 6.8.0-111-generic #111-ubuntu smp preempt_dynamic sat apr 11 23:16:02 utc 2026 x86_64 x86_64 x86_64 gnulinux
80 #
81 #: Configure command line arguments.
82 #
83 #: Variables propagated from previous config.sh file.
84  
85 1 our $summary = <<'!END!';
86 Summary of my $package (revision $revision $version_patchlevel_string) configuration:
87 $git_commit_id_title $git_commit_id$git_ancestor_line
88 Platform:
89 osname=$osname
90 osvers=$osvers
91 archname=$archname
92 uname='$myuname'
93 config_args='$config_args'
94 hint=$hint
95 useposix=$useposix
96 d_sigaction=$d_sigaction
97 useithreads=$useithreads
98 usemultiplicity=$usemultiplicity
99 use64bitint=$use64bitint
100 use64bitall=$use64bitall
101 uselongdouble=$uselongdouble
102 usemymalloc=$usemymalloc
103 default_inc_excludes_dot=$default_inc_excludes_dot
104 Compiler:
105 cc='$cc'
106 ccflags ='$ccflags'
107 optimize='$optimize'
108 cppflags='$cppflags'
109 ccversion='$ccversion'
110 gccversion='$gccversion'
111 gccosandvers='$gccosandvers'
112 intsize=$intsize
113 longsize=$longsize
114 ptrsize=$ptrsize
115 doublesize=$doublesize
116 byteorder=$byteorder
117 doublekind=$doublekind
118 d_longlong=$d_longlong
119 longlongsize=$longlongsize
120 d_longdbl=$d_longdbl
121 longdblsize=$longdblsize
122 longdblkind=$longdblkind
123 ivtype='$ivtype'
124 ivsize=$ivsize
125 nvtype='$nvtype'
126 nvsize=$nvsize
127 Off_t='$lseektype'
128 lseeksize=$lseeksize
129 alignbytes=$alignbytes
130 prototype=$prototype
131 Linker and Libraries:
132 ld='$ld'
133 ldflags ='$ldflags'
134 libpth=$libpth
135 libs=$libs
136 perllibs=$perllibs
137 libc=$libc
138 so=$so
139 useshrplib=$useshrplib
140 libperl=$libperl
141 gnulibc_version='$gnulibc_version'
142 Dynamic Linking:
143 dlsrc=$dlsrc
144 dlext=$dlext
145 d_dlsymun=$d_dlsymun
146 ccdlflags='$ccdlflags'
147 cccdlflags='$cccdlflags'
148 lddlflags='$lddlflags'
149  
150 !END!
151 1 my $summary_expanded;
152  
153 sub myconfig {
154 1 ▶ return $summary_expanded if $summary_expanded;
Subroutine myconfig: called CC=5 SCAR=16.3
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
if $summary_expanded 0 1 1
155 1 ($summary_expanded = $summary) =~ s{\$(\w+)}
156 {
157 63 my $c;
158 63 ▶ if ($1 eq 'git_ancestor_line') {
Branch: 1 branch
BranchTrueFalseTotal
if ($1 eq 'git_ancestor_line') { } 1 62 63
159 1 ▶ if ($Config::Config{git_ancestor}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Config::Config{'git_ancestor'}) { } 0 1 1
160 0 $c= "\n Ancestor: $Config::Config{git_ancestor}";
161 } else {
162 1 $c= "";
163 }
164 } else {
165 62 $c = $Config::Config{$1};
166 }
167 63 ▶ defined($c) ? $c : 'undef'
Branch: 1 branch
BranchTrueFalseTotal
defined $c ? : 59 4 63
168 }ge;
169 1 $summary_expanded;
170 }
171  
172 3 ▶sub STORE { die "\%Config::Config is read-only\n" }
Subroutine STORE: called CC=1 SCAR=0.0
173 1 *DELETE = *CLEAR = \*STORE; # Typeglob aliasing uses less space
174  
175 sub config_sh {
176 3 ▶ my $s = ' ' x 32000; # prealloc 32.000 byte, I got 33568
Subroutine config_sh: called CC=3 SCAR=11.0
Pod documented
177 3 $s = '';
178 3 for my $k (sort &Config::KEYS) { # XXX sort Config::KEYS() is broken
179 3651 my $v = Config->FETCH($k);
180 3651 ▶ $s .= defined $v ? "$k='$v'\n" : "$k=''\n";
Branch: 1 branch
BranchTrueFalseTotal
defined $v ? : 3021 630 3651
181 }
182 $s
183 3 }
184  
185 sub config_re {
186 15 ▶ my $re = shift or return ();
Subroutine config_re: called CC=5 SCAR=16.2
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
my $re = shift() or return () 0 15 15
187 15 my @s;
188 15 for my $k (sort &Config::KEYS) {
189 18255 ▶ if (eval { $k =~ /^(?:$re)/ }) {
Branch: 1 branch
BranchTrueFalseTotal
if (eval { do { $k =~ /^(?:$re)/ } }) 68 18187 18255
190 68 my $v = Config->FETCH($k);
191 68 ▶ push @s, defined $v ? "$k='$v'" : "$k=''";
Branch: 1 branch
BranchTrueFalseTotal
defined $v ? : 68 0 68
192 }
193 }
194 sort @s
195 15 }
196  
197 sub config_vars {
198 # implements -V:cfgvar option (see perlrun -V:)
199 10 ▶ foreach (@_) {
Subroutine config_vars: called CC=11 SCAR=24.0
Pod documented
200 # find optional leading, trailing colons; and query-spec
201 10 my ($notag,$qry,$lncont) = m/^(:)?(.*?)(:)?$/; # flags fore and aft,
202 # map colon-flags to print decorations
203 10 ▶ my $prfx = $notag ? '': "$qry="; # tag-prefix for print
Branch: 1 branch
BranchTrueFalseTotal
$notag ? : 3 7 10
204 10 ▶ my $lnend = $lncont ? ' ' : ";\n"; # line ending for print
Branch: 1 branch
BranchTrueFalseTotal
$lncont ? : 4 6 10
205  
206 # all config-vars are by definition \w only, any \W means regex
207 10 ▶ if ($qry =~ /\W/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($qry =~ /\W/) { } 8 2 10
208 8 my @matches = config_re($qry);
209 8 ▶ print map "$_$lnend", @matches ? @matches : "$qry: not found" if !$notag;
Branch: 2 branches
BranchTrueFalseTotal
unless $notag 5 3 8
@matches ? : 3 2 5
210 8 ▶ print map { s/\w+=//; "$_$lnend" } @matches ? @matches : "$qry: not found" if $notag;
Branch: 2 branches
BranchTrueFalseTotal
if $notag 3 5 8
@matches ? : 3 0 3
211 } else {
212 2 ▶ my $v = (exists $Config::Config{$qry}) ? $Config::Config{$qry}
Branch: 1 branch
BranchTrueFalseTotal
exists $Config::Config{$qry} ? : 1 1 2
213 : 'UNKNOWN';
214 2 ▶ $v = 'undef' unless defined $v;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $v 0 2 2
215 2 print "${prfx}'${v}'$lnend";
216 }
217 }
218 }
219  
220 # Called by the real AUTOLOAD
221 sub launcher {
222 1 ▶ undef &AUTOLOAD;
Subroutine launcher: called CC=1 SCAR=0.0
Pod undocumented
223 1 goto \&$Config::AUTOLOAD;
224 }
225  
226 1 1;
« xsc_test.pl ↑ Summary blib/arch/Config.pm »