1#!/pro/bin/perl
2
3use strict;
4use warnings;
5
6BEGIN {
7    use Test::More;
8    my $tests = 101;
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");
46is ($sig, $md5, "MD5");
47
48__END__
49Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
50
51  Platform:
52    osname=aix, osvers=5.3.0.0, archname=aix-64all
53    uname='aix i3 3 5 0004898ad300 '
54    config_args='-Dusedevel -Duse64bitall -Uversiononly -Dinc_version_list=none -des'
55    hint=recommended, useposix=true, d_sigaction=define
56    useithreads=undef, usemultiplicity=undef
57    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
58    use64bitint=define, use64bitall=define, uselongdouble=undef
59    usemymalloc=n, bincompat5005=undef
60  Compiler:
61    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',
62    optimize='-O',
63    cppflags='-DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -I/pro/local/include'
64    ccversion='11.1.0.8', gccversion='', gccosandvers=''
65    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
66    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
67    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
68    alignbytes=8, prototype=define
69  Linker and Libraries:
70    ld='ld', ldflags ='-L/usr/local/ppc64/lib64 -b64 -q64 -L/pro/local/lib -brtl -bdynamic -b64'
71    libpth=/usr/local/ppc64/lib64 /lib /usr/lib /usr/ccs/lib /usr/local/lib /usr/lib64
72    libs=-lbind -lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lc
73    perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc
74    libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
75    gnulibc_version=''
76  Dynamic Linking:
77    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -bE:/pro/lib/perl5/5.14.2/aix-64all/CORE/perl.exp'
78    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'
79
80
81Characteristics of this binary (from libperl):
82  Compile-time options: DEBUGGING PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
83                        PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL
84                        USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
85                        USE_PERL_ATOF
86  Built under aix
87  Compiled at May 11 2012 16:36:53
88  @INC:
89    /pro/lib/perl5/site_perl/5.14.2/aix-64all
90    /pro/lib/perl5/site_perl/5.14.2
91    /pro/lib/perl5/5.14.2/aix-64all
92    /pro/lib/perl5/5.14.2
93    .
94