1#!/pro/bin/perl 2 3use strict; 4use warnings; 5 6BEGIN { 7 use Test::More; 8 my $tests = 107; 9 unless ($ENV{PERL_CORE}) { 10 require Test::NoWarnings; 11 Test::NoWarnings->import (); 12 $tests++; 13 } 14 15 plan tests => $tests; 16 } 17 18use Config::Perl::V; 19 20ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block"); 21ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); 22 23is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); 24is ($conf->{build}{stamp}, "May 11 2012 16:36:53", "Build time"); 25is ($conf->{config}{version}, "5.14.2", "reconstructed \%Config{version}"); 26is ($conf->{config}{gccversion}, "", "not built with gcc"); 27is ($conf->{config}{ccversion}, "11.1.0.8", "xlc version"); 28 29my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; 30foreach my $o (sort qw( 31 DEBUGGING PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP 32 PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL 33 USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO 34 USE_PERL_ATOF 35 )) { 36 is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); 37 delete $opt->{$o}; 38 } 39foreach my $o (sort keys %$opt) { 40 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); 41 } 42 43eval { require Digest::MD5; }; 44my $md5 = $@ ? "0" x 32 : "778815a670c0c454738aedf0c88930ba"; 45ok (my $sig = Config::Perl::V::signature ($conf), "Get signature"); 46 47SKIP: { 48 ord "A" == 65 or skip "ASCII-centric test", 1; 49 is ($sig, $md5, "MD5"); 50 } 51 52__END__ 53Summary of my perl5 (revision 5 version 14 subversion 2) configuration: 54 55 Platform: 56 osname=aix, osvers=5.3.0.0, archname=aix-64all 57 uname='aix i3 3 5 0004898ad300 ' 58 config_args='-Dusedevel -Duse64bitall -Uversiononly -Dinc_version_list=none -des' 59 hint=recommended, useposix=true, d_sigaction=define 60 useithreads=undef, usemultiplicity=undef 61 useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef 62 use64bitint=define, use64bitall=define, uselongdouble=undef 63 usemymalloc=n, bincompat5005=undef 64 Compiler: 65 cc='xlc -q64', ccflags ='-q64 -DDEBUGGING -qlanglvl=extended -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -qlanglvl=extended -I/pro/local/include -q64 -DUSE_64_BIT_ALL -q64', 66 optimize='-O', 67 cppflags='-DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -I/pro/local/include' 68 ccversion='11.1.0.8', gccversion='', gccosandvers='' 69 intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321 70 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 71 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 72 alignbytes=8, prototype=define 73 Linker and Libraries: 74 ld='ld', ldflags ='-L/usr/local/ppc64/lib64 -b64 -q64 -L/pro/local/lib -brtl -bdynamic -b64' 75 libpth=/usr/local/ppc64/lib64 /lib /usr/lib /usr/ccs/lib /usr/local/lib /usr/lib64 76 libs=-lbind -lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lc 77 perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc 78 libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a 79 gnulibc_version='' 80 Dynamic Linking: 81 dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/pro/lib/perl5/5.14.2/aix-64all/CORE/perl.exp' 82 cccdlflags=' ', lddlflags='-b64 -bhalt:4 -G -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lc -lm -L/usr/local/ppc64/lib64 -L/pro/local/lib' 83 84 85Characteristics of this binary (from libperl): 86 Compile-time options: DEBUGGING PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP 87 PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL 88 USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO 89 USE_PERL_ATOF 90 Built under aix 91 Compiled at May 11 2012 16:36:53 92 @INC: 93 /pro/lib/perl5/site_perl/5.14.2/aix-64all 94 /pro/lib/perl5/site_perl/5.14.2 95 /pro/lib/perl5/5.14.2/aix-64all 96 /pro/lib/perl5/5.14.2 97 . 98