1#!/pro/bin/perl 2 3use strict; 4use warnings; 5 6BEGIN { 7 use Test::More; 8 my $tests = 99; 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}, 0, "No build time known"); 25is ($conf->{config}{version}, "5.10.0", "reconstructed \%Config{version}"); 26 27my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; 28foreach my $o (sort keys %$opt) { 29 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); 30 } 31 32eval { require Digest::MD5; }; 33my $md5 = $@ ? "0" x 32 : "ce0a7871dfddbbed0a6c685c0f52dbf9"; 34ok (my $sig = Config::Perl::V::signature ($conf), "Get signature"); 35is ($sig, $md5, "MD5"); 36 37__END__ 38Summary of my perl5 (revision 5 version 10 subversion 0) configuration: 39 Platform: 40 osname=linux, osvers=2.6.22.13-0.3-default, archname=i686-linux-64int 41 uname='linux nb09 2.6.22.13-0.3-default #1 smp 20071119 15:02:58 utc i686 i686 i386 gnulinux ' 42 config_args='-Duse64bitint -des' 43 hint=recommended, useposix=true, d_sigaction=define 44 useithreads=undef, usemultiplicity=undef 45 useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef 46 use64bitint=define, use64bitall=undef, uselongdouble=undef 47 usemymalloc=n, bincompat5005=undef 48 Compiler: 49 cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', 50 optimize='-O2 -g', 51 cppflags='-fno-strict-aliasing -pipe -I/pro/local/include' 52 ccversion='', gccversion='4.2.1 (SUSE Linux)', gccosandvers='' 53 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 54 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 55 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 56 alignbytes=4, prototype=define 57 Linker and Libraries: 58 ld='cc', ldflags ='-L/pro/local/lib' 59 libpth=/pro/local/lib /lib /usr/lib /usr/local/lib 60 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc 61 perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc 62 libc=/lib/libc-2.6.1.so, so=so, useshrplib=false, libperl=libperl.a 63 gnulibc_version='2.6.1' 64 Dynamic Linking: 65 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' 66 cccdlflags='-fPIC', lddlflags='-shared -O2 -L/pro/local/lib' 67