11556Srgrimes#!/pro/bin/perl 21556Srgrimes 31556Srgrimesuse strict; 41556Srgrimesuse warnings; 51556Srgrimes 61556SrgrimesBEGIN { 71556Srgrimes use Test::More; 81556Srgrimes my $tests = 134; 91556Srgrimes unless ($ENV{PERL_CORE}) { 101556Srgrimes require Test::NoWarnings; 111556Srgrimes Test::NoWarnings->import (); 121556Srgrimes $tests++; 131556Srgrimes } 141556Srgrimes 151556Srgrimes plan tests => $tests; 161556Srgrimes } 171556Srgrimes 181556Srgrimesuse Config::Perl::V qw( summary ); 191556Srgrimes 201556Srgrimesok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block"); 211556Srgrimesok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); 221556Srgrimes 231556Srgrimesis ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); 241556Srgrimesis ($conf->{build}{stamp}, "May 23 2019 14:05:36", "Build time"); 251556Srgrimesis ($conf->{config}{version}, "5.30.0", "reconstructed \$Config{version}"); 261556Srgrimes 271556Srgrimesmy $opt = Config::Perl::V::plv2hash ("")->{build}{options}; 281556Srgrimesforeach my $o (sort qw( 291556Srgrimes HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE 301556Srgrimes PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP 311556Srgrimes PERL_OP_PARENT PERL_PRESERVE_IVUV USE_THREAD_SAFE_LOCALE 321556Srgrimes USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES 331556Srgrimes USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC 341556Srgrimes USE_LOCALE_TIME USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF 353044Sdg USE_REENTRANT_API 3618016Speter )) { 371556Srgrimes is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); 381556Srgrimes delete $opt->{$o}; 391556Srgrimes } 4017987Speterforeach my $o (sort keys %$opt) { 411556Srgrimes is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); 421556Srgrimes } 4317987Speter 4417987Spetereval { require Digest::MD5; }; 4517987Spetermy $md5 = $@ ? "0" x 32 : "b1138522685da4fff74f7b1118128d02"; 4617987Speterok (my $sig = Config::Perl::V::signature ($conf), "Get signature"); 4717987Speter 4817987SpeterSKIP: { 4917987Speter ord "A" == 65 or skip "ASCII-centric test", 1; 5017987Speter is ($sig, $md5, "MD5"); 5117987Speter } 5217987Speter 5317987Speteris_deeply ($conf->{build}{patches}, [ ], "No patches"); 5417987Speter 5517987Spetermy %check = ( 561556Srgrimes alignbytes => 16, 571556Srgrimes api_version => 30, 5817987Speter bincompat5005 => "undef", 591556Srgrimes byteorder => 12345678, 6017987Speter cc => "cc", 6117987Speter cccdlflags => "-fPIC", 6217987Speter ccdlflags => "-Wl,-E -Wl,-rpath,/pro/lib/perl5/5.30.0/x86_64-linux-thread-multi-ld/CORE", 631556Srgrimes config_args => "-Dusethreads -Duseithreads -Duse64bitall -Duselongdouble -Duseshrplib -des", 641556Srgrimes gccversion => "8.3.1 20190226 [gcc-8-branch revision 269204]", 6517987Speter gnulibc_version => "2.29", 6617987Speter ivsize => 8, 671556Srgrimes ivtype => "long", 681556Srgrimes ld => "cc", 691556Srgrimes lddlflags => "-shared -O2 -L/pro/local/lib -fstack-protector-strong", 701556Srgrimes ldflags => "-L/pro/local/lib -fstack-protector-strong", 711556Srgrimes libc => "libc-2.29.so", 721556Srgrimes lseektype => "off_t", 731556Srgrimes osvers => "5.1.3-1-default", 741556Srgrimes use64bitall => "define", 751556Srgrimes use64bitint => "define", 761556Srgrimes usemymalloc => "n", 771556Srgrimes default_inc_excludes_dot 781556Srgrimes => "define", 791556Srgrimes ); 801556Srgrimesis ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check; 811556Srgrimes 821556Srgrimesok (my $info = summary ($conf), "A summary"); 831556Srgrimesok (exists $info->{$_}, "Summary has $_") for qw( cc config_args usemymalloc default_inc_excludes_dot ); 841556Srgrimesis ($info->{default_inc_excludes_dot}, "define", "This build has . NOT in INC"); 851556Srgrimes 861556Srgrimes__END__ 871556SrgrimesSummary of my perl5 (revision 5 version 30 subversion 0) configuration: 881556Srgrimes 8917987Speter Platform: 9017987Speter osname=linux 9117987Speter osvers=5.1.3-1-default 9217987Speter archname=x86_64-linux-thread-multi-ld 9317987Speter uname='linux lx09 5.1.3-1-default #1 smp fri may 17 04:54:29 utc 2019 (07d2e25) x86_64 x86_64 x86_64 gnulinux ' 9417987Speter config_args='-Dusethreads -Duseithreads -Duse64bitall -Duselongdouble -Duseshrplib -des' 9517987Speter hint=recommended 9617987Speter useposix=true 971556Srgrimes d_sigaction=define 981556Srgrimes useithreads=define 991556Srgrimes usemultiplicity=define 1001556Srgrimes use64bitint=define 1011556Srgrimes use64bitall=define 1021556Srgrimes uselongdouble=define 1031556Srgrimes usemymalloc=n 1041556Srgrimes default_inc_excludes_dot=define 1051556Srgrimes bincompat5005=undef 1061556Srgrimes Compiler: 1071556Srgrimes cc='cc' 1081556Srgrimes ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' 1091556Srgrimes optimize='-O2' 11017987Speter cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include' 11117987Speter ccversion='' 11217987Speter gccversion='8.3.1 20190226 [gcc-8-branch revision 269204]' 1131556Srgrimes gccosandvers='' 1141556Srgrimes intsize=4 1151556Srgrimes longsize=8 1161556Srgrimes ptrsize=8 1171556Srgrimes doublesize=8 1181556Srgrimes byteorder=12345678 1191556Srgrimes doublekind=3 1201556Srgrimes d_longlong=define 1211556Srgrimes longlongsize=8 1221556Srgrimes d_longdbl=define 1231556Srgrimes longdblsize=16 1241556Srgrimes longdblkind=3 1251556Srgrimes ivtype='long' 1261556Srgrimes ivsize=8 12717987Speter nvtype='long double' 12817987Speter nvsize=16 1291556Srgrimes Off_t='off_t' 1301556Srgrimes lseeksize=8 1311556Srgrimes alignbytes=16 1321556Srgrimes prototype=define 1331556Srgrimes Linker and Libraries: 1341556Srgrimes ld='cc' 1351556Srgrimes ldflags ='-L/pro/local/lib -fstack-protector-strong' 1361556Srgrimes libpth=/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/8/include-fixed /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/lib /usr/lib /pro/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64 1371556Srgrimes libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat 1381556Srgrimes perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc 1391556Srgrimes libc=libc-2.29.so 1401556Srgrimes so=so 1411556Srgrimes useshrplib=true 1421556Srgrimes libperl=libperl.so 14317987Speter gnulibc_version='2.29' 1441556Srgrimes Dynamic Linking: 1451556Srgrimes dlsrc=dl_dlopen.xs 14617987Speter dlext=so 1471556Srgrimes d_dlsymun=undef 1481556Srgrimes ccdlflags='-Wl,-E -Wl,-rpath,/pro/lib/perl5/5.30.0/x86_64-linux-thread-multi-ld/CORE' 1491556Srgrimes cccdlflags='-fPIC' 1501556Srgrimes lddlflags='-shared -O2 -L/pro/local/lib -fstack-protector-strong' 1511556Srgrimes 1521556Srgrimes 1531556SrgrimesCharacteristics of this binary (from libperl): 1541556Srgrimes Compile-time options: 1551556Srgrimes HAS_TIMES 1561556Srgrimes MULTIPLICITY 15717987Speter PERLIO_LAYERS 1581556Srgrimes PERL_COPY_ON_WRITE 1591556Srgrimes PERL_DONT_CREATE_GVSV 1601556Srgrimes PERL_IMPLICIT_CONTEXT 1611556Srgrimes PERL_MALLOC_WRAP 1621556Srgrimes PERL_OP_PARENT 1631556Srgrimes PERL_PRESERVE_IVUV 1641556Srgrimes USE_64_BIT_ALL 1651556Srgrimes USE_64_BIT_INT 1661556Srgrimes USE_ITHREADS 1671556Srgrimes USE_LARGE_FILES 1681556Srgrimes USE_LOCALE 1691556Srgrimes USE_LOCALE_COLLATE 1701556Srgrimes USE_LOCALE_CTYPE 17117987Speter USE_LOCALE_NUMERIC 17217987Speter USE_LOCALE_TIME 17317987Speter USE_LONG_DOUBLE 17417987Speter USE_PERLIO 17517987Speter USE_PERL_ATOF 1761556Srgrimes USE_REENTRANT_API 1771556Srgrimes USE_THREAD_SAFE_LOCALE 1781556Srgrimes Built under linux 1791556Srgrimes Compiled at May 23 2019 14:05:36 1801556Srgrimes %ENV: 1811556Srgrimes PERL6LIB="inst#/pro/3gl/CPAN/rakudo/install" 1821556Srgrimes @INC: 1831556Srgrimes /pro/lib/perl5/site_perl/5.30.0/x86_64-linux-thread-multi-ld 1841556Srgrimes /pro/lib/perl5/site_perl/5.30.0 1851556Srgrimes /pro/lib/perl5/5.30.0/x86_64-linux-thread-multi-ld 1861556Srgrimes /pro/lib/perl5/5.30.0 1871556Srgrimes