16fb12b70Safresh1#!/pro/bin/perl 26fb12b70Safresh1 36fb12b70Safresh1use strict; 46fb12b70Safresh1use warnings; 56fb12b70Safresh1 66fb12b70Safresh1BEGIN { 76fb12b70Safresh1 use Test::More; 8*e0680481Safresh1 my $tests = 107; 96fb12b70Safresh1 unless ($ENV{PERL_CORE}) { 106fb12b70Safresh1 require Test::NoWarnings; 116fb12b70Safresh1 Test::NoWarnings->import (); 126fb12b70Safresh1 $tests++; 136fb12b70Safresh1 } 146fb12b70Safresh1 156fb12b70Safresh1 plan tests => $tests; 166fb12b70Safresh1 } 176fb12b70Safresh1 186fb12b70Safresh1use Config::Perl::V; 196fb12b70Safresh1 206fb12b70Safresh1ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block"); 216fb12b70Safresh1ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); 226fb12b70Safresh1 236fb12b70Safresh1is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); 246fb12b70Safresh1is ($conf->{build}{stamp}, "Dec 20 2010 12:46:00", "Build time"); 256fb12b70Safresh1is ($conf->{config}{version}, "5.12.2", "reconstructed \%Config{version}"); 266fb12b70Safresh1is ($conf->{config}{gccversion}, "", "not built with gcc"); 276fb12b70Safresh1is ($conf->{config}{ccversion}, "B3910B", "built with HP C-ANSI-C"); 286fb12b70Safresh1 296fb12b70Safresh1my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; 306fb12b70Safresh1foreach my $o (sort qw( 316fb12b70Safresh1 PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL 326fb12b70Safresh1 USE_64_BIT_INT USE_LARGE_FILES USE_LONG_DOUBLE 336fb12b70Safresh1 USE_PERLIO USE_PERL_ATOF 346fb12b70Safresh1 )) { 356fb12b70Safresh1 is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); 366fb12b70Safresh1 delete $opt->{$o}; 376fb12b70Safresh1 } 386fb12b70Safresh1foreach my $o (sort keys %$opt) { 396fb12b70Safresh1 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); 406fb12b70Safresh1 } 416fb12b70Safresh1 429f11ffb7Safresh1eval { require Digest::MD5; }; 439f11ffb7Safresh1my $md5 = $@ ? "0" x 32 : "a2c38153cc47d340bc140d0bfe294afb"; 449f11ffb7Safresh1ok (my $sig = Config::Perl::V::signature ($conf), "Get signature"); 45*e0680481Safresh1 46*e0680481Safresh1SKIP: { 47*e0680481Safresh1 ord "A" == 65 or skip "ASCII-centric test", 1; 489f11ffb7Safresh1 is ($sig, $md5, "MD5"); 49*e0680481Safresh1 } 509f11ffb7Safresh1 516fb12b70Safresh1__END__ 526fb12b70Safresh1Summary of my perl5 (revision 5 version 12 subversion 2) configuration: 536fb12b70Safresh1 546fb12b70Safresh1 Platform: 556fb12b70Safresh1 osname=hpux, osvers=11.31, archname=IA64.ARCHREV_0-LP64-ld 566fb12b70Safresh1 uname='hp-ux x2 b.11.31 u ia64 2977233888 unlimited-user license ' 576fb12b70Safresh1 config_args='-Duse64bitall -Duselongdouble -des' 586fb12b70Safresh1 hint=recommended, useposix=true, d_sigaction=define 596fb12b70Safresh1 useithreads=undef, usemultiplicity=undef 606fb12b70Safresh1 useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef 616fb12b70Safresh1 use64bitint=define, use64bitall=define, uselongdouble=define 626fb12b70Safresh1 usemymalloc=n, bincompat5005=undef 636fb12b70Safresh1 Compiler: 646fb12b70Safresh1 cc='cc', ccflags =' -Ae -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ', 656fb12b70Safresh1 optimize='+O2 +Onolimit', 666fb12b70Safresh1 cppflags='-Aa -D__STDC_EXT__ -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Ae -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include' 676fb12b70Safresh1 ccversion='B3910B', gccversion='', gccosandvers='' 686fb12b70Safresh1 intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321 696fb12b70Safresh1 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 706fb12b70Safresh1 ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8 716fb12b70Safresh1 alignbytes=16, prototype=define 726fb12b70Safresh1 Linker and Libraries: 736fb12b70Safresh1 ld='/usr/bin/ld', ldflags ='-L/pro/local/lib +DD64 -L/usr/lib/hpux64' 746fb12b70Safresh1 libpth=/pro/local/lib /usr/lib/hpux64 /lib /usr/lib /usr/ccs/lib /usr/local/lib 756fb12b70Safresh1 libs=-lcl -lpthread -lnsl -lnm -ldb -ldl -ldld -lm -lsec -lc 766fb12b70Safresh1 perllibs=-lcl -lpthread -lnsl -lnm -ldl -ldld -lm -lsec -lc 776fb12b70Safresh1 libc=/usr/lib/hpux64/libc.so, so=so, useshrplib=false, libperl=libperl.a 786fb12b70Safresh1 gnulibc_version='' 796fb12b70Safresh1 Dynamic Linking: 806fb12b70Safresh1 dlsrc=dl_hpux.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred ' 816fb12b70Safresh1 cccdlflags='+Z', lddlflags='-b +vnocompatwarnings -L/pro/local/lib -L/usr/lib/hpux64' 826fb12b70Safresh1 836fb12b70Safresh1 846fb12b70Safresh1Characteristics of this binary (from libperl): 856fb12b70Safresh1 Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL 866fb12b70Safresh1 USE_64_BIT_INT USE_LARGE_FILES USE_LONG_DOUBLE 876fb12b70Safresh1 USE_PERLIO USE_PERL_ATOF 886fb12b70Safresh1 Built under hpux 896fb12b70Safresh1 Compiled at Dec 20 2010 12:46:00 906fb12b70Safresh1 @INC: 916fb12b70Safresh1 /pro/lib/perl5/site_perl/5.12.2/IA64.ARCHREV_0-LP64-ld 926fb12b70Safresh1 /pro/lib/perl5/site_perl/5.12.2 936fb12b70Safresh1 /pro/lib/perl5/5.12.2/IA64.ARCHREV_0-LP64-ld 946fb12b70Safresh1 /pro/lib/perl5/5.12.2 956fb12b70Safresh1 . 96