15759b3d2Safresh1#!/pro/bin/perl 25759b3d2Safresh1 35759b3d2Safresh1use strict; 45759b3d2Safresh1use warnings; 55759b3d2Safresh1 65759b3d2Safresh1BEGIN { 75759b3d2Safresh1 use Test::More; 8*f2a19305Safresh1 my $tests = 126; 95759b3d2Safresh1 unless ($ENV{PERL_CORE}) { 105759b3d2Safresh1 require Test::NoWarnings; 115759b3d2Safresh1 Test::NoWarnings->import (); 125759b3d2Safresh1 $tests++; 135759b3d2Safresh1 } 145759b3d2Safresh1 155759b3d2Safresh1 plan tests => $tests; 165759b3d2Safresh1 } 175759b3d2Safresh1 185759b3d2Safresh1use Config::Perl::V; 195759b3d2Safresh1 205759b3d2Safresh1ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block"); 215759b3d2Safresh1ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); 225759b3d2Safresh1 235759b3d2Safresh1is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); 245759b3d2Safresh1is ($conf->{build}{stamp}, "Nov 19 2015 00:18:50", "Build time"); 255759b3d2Safresh1is ($conf->{config}{version}, "5.23.5", "reconstructed \$Config{version}"); 265759b3d2Safresh1 275759b3d2Safresh1my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; 285759b3d2Safresh1foreach my $o (sort qw( 295759b3d2Safresh1 HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS 305759b3d2Safresh1 PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV 315759b3d2Safresh1 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD 325759b3d2Safresh1 PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP 335759b3d2Safresh1 PERL_PRESERVE_IVUV 345759b3d2Safresh1 USE_ITHREADS 355759b3d2Safresh1 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE 365759b3d2Safresh1 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME 375759b3d2Safresh1 USE_PERLIO USE_PERL_ATOF 385759b3d2Safresh1 )) { 395759b3d2Safresh1 is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); 405759b3d2Safresh1 delete $opt->{$o}; 415759b3d2Safresh1 } 425759b3d2Safresh1foreach my $o (sort keys %$opt) { 435759b3d2Safresh1 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); 445759b3d2Safresh1 } 455759b3d2Safresh1 465759b3d2Safresh1eval { require Digest::MD5; }; 475759b3d2Safresh1my $md5 = $@ ? "0" x 32 : "bccd5d78dfebd48b89faf7f1fe711733"; 485759b3d2Safresh1ok (my $sig = Config::Perl::V::signature ($conf), "Get signature"); 49*f2a19305Safresh1 50*f2a19305Safresh1SKIP: { 51*f2a19305Safresh1 ord "A" == 65 or skip "ASCII-centric test", 1; 525759b3d2Safresh1 is ($sig, $md5, "MD5"); 53*f2a19305Safresh1 } 545759b3d2Safresh1 555759b3d2Safresh1is_deeply ($conf->{build}{patches}, [], "No local patches"); 565759b3d2Safresh1 575759b3d2Safresh1my %check = ( 585759b3d2Safresh1 alignbytes => 8, 595759b3d2Safresh1 api_version => 23, 605759b3d2Safresh1 bincompat5005 => "undef", 615759b3d2Safresh1 byteorder => 1234, 625759b3d2Safresh1 cc => "cl", 635759b3d2Safresh1 cccdlflags => "", 645759b3d2Safresh1 ccdlflags => "", 655759b3d2Safresh1 config_args => "undef", 665759b3d2Safresh1 gccversion => "", 675759b3d2Safresh1 gnulibc_version => "", 685759b3d2Safresh1 ivsize => 4, 695759b3d2Safresh1 ivtype => "long", 705759b3d2Safresh1 ld => "link", 715759b3d2Safresh1 lddlflags => q{-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" -subsystem:console,"5.01"}, 725759b3d2Safresh1 ldflags => q{-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" -subsystem:console,"5.01"}, 735759b3d2Safresh1 libc => "msvcrt.lib", 745759b3d2Safresh1 lseektype => "__int64", 755759b3d2Safresh1 osvers => "6.1", 765759b3d2Safresh1 use64bitall => "undef", 775759b3d2Safresh1 use64bitint => "undef", 785759b3d2Safresh1 ); 795759b3d2Safresh1is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check; 805759b3d2Safresh1 815759b3d2Safresh1__END__ 825759b3d2Safresh1Summary of my perl5 (revision 5 version 23 subversion 5) configuration: 835759b3d2Safresh1 845759b3d2Safresh1 Platform: 855759b3d2Safresh1 osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread 865759b3d2Safresh1 uname='' 875759b3d2Safresh1 config_args='undef' 885759b3d2Safresh1 hint=recommended, useposix=true, d_sigaction=undef 895759b3d2Safresh1 useithreads=define, usemultiplicity=define 905759b3d2Safresh1 use64bitint=undef, use64bitall=undef, uselongdouble=undef 915759b3d2Safresh1 usemymalloc=n, bincompat5005=undef 925759b3d2Safresh1 Compiler: 935759b3d2Safresh1 cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS', 945759b3d2Safresh1 optimize='-O1 -MD -Zi -DNDEBUG -GL', 955759b3d2Safresh1 cppflags='-DWIN32' 965759b3d2Safresh1 ccversion='18.00.31101', gccversion='', gccosandvers='' 975759b3d2Safresh1 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, doublekind=3 985759b3d2Safresh1 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8, longdblkind=0 995759b3d2Safresh1 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 1005759b3d2Safresh1 alignbytes=8, prototype=define 1015759b3d2Safresh1 Linker and Libraries: 1025759b3d2Safresh1 ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" -subsystem:console,"5.01"' 1035759b3d2Safresh1 libpth=\lib 1045759b3d2Safresh1 libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib 1055759b3d2Safresh1 perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib 1065759b3d2Safresh1 libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl523.lib 1075759b3d2Safresh1 gnulibc_version='' 1085759b3d2Safresh1 Dynamic Linking: 1095759b3d2Safresh1 dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' 1105759b3d2Safresh1 cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" -subsystem:console,"5.01"' 1115759b3d2Safresh1 1125759b3d2Safresh1 1135759b3d2Safresh1Characteristics of this binary (from libperl): 1145759b3d2Safresh1 Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY 1155759b3d2Safresh1 PERLIO_LAYERS PERL_COPY_ON_WRITE 1165759b3d2Safresh1 PERL_DONT_CREATE_GVSV 1175759b3d2Safresh1 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD 1185759b3d2Safresh1 PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS 1195759b3d2Safresh1 PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_ITHREADS 1205759b3d2Safresh1 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE 1215759b3d2Safresh1 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME 1225759b3d2Safresh1 USE_PERLIO USE_PERL_ATOF 1235759b3d2Safresh1 Built under MSWin32 1245759b3d2Safresh1 Compiled at Nov 19 2015 00:18:50 1255759b3d2Safresh1 @INC: 1265759b3d2Safresh1 C:/p523/src/lib 1275759b3d2Safresh1 . 128