diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2017-02-27 16:58:16 +0100 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2017-02-27 16:58:16 +0100 |
commit | 275d368b86effce470e1f872f4c3e0a5af1fec93 (patch) | |
tree | 517c9b1dd18e2c803fd5a6cc2b37ccf35e6262d3 /cpan | |
parent | daa60504d01976b7c4027ff3c85f9968137d9fcf (diff) | |
download | perl-275d368b86effce470e1f872f4c3e0a5af1fec93.tar.gz |
Update Config::Perl::V to 0.28
- add default_inc_excludes_dot
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Config-Perl-V/V.pm | 24 | ||||
-rw-r--r-- | cpan/Config-Perl-V/t/30_plv5240.t | 11 | ||||
-rw-r--r-- | cpan/Config-Perl-V/t/31_plv52511.t | 182 |
3 files changed, 202 insertions, 15 deletions
diff --git a/cpan/Config-Perl-V/V.pm b/cpan/Config-Perl-V/V.pm index c396f31854..9e9c09c9fa 100644 --- a/cpan/Config-Perl-V/V.pm +++ b/cpan/Config-Perl-V/V.pm @@ -8,8 +8,8 @@ use warnings; use Config; use Exporter; use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS); -$VERSION = "0.27"; -@ISA = ("Exporter"); +$VERSION = "0.28"; +@ISA = qw( Exporter ); @EXPORT_OK = qw( plv2hash summary myconfig signature ); %EXPORT_TAGS = ( all => [ @EXPORT_OK ], @@ -161,7 +161,7 @@ my @config_vars = qw( useithreads usemultiplicity useperlio d_sfio uselargefiles usesocks use64bitint use64bitall uselongdouble - usemymalloc bincompat5005 + usemymalloc default_inc_excludes_dot bincompat5005 cc ccflags optimize @@ -190,8 +190,7 @@ my %empty_build = ( patches => [], ); -sub _make_derived -{ +sub _make_derived { my $conf = shift; for ( [ lseektype => "Off_t" ], @@ -230,11 +229,12 @@ sub _make_derived $conf->{config}{git_describe} ||= $conf->{config}{perl_patchlevel}; } + $conf->{config}{$_} ||= "undef" for grep m/^(?:use|def)/ => @config_vars; + $conf; } # _make_derived -sub plv2hash -{ +sub plv2hash { my %config; my $pv = join "\n" => @_; @@ -308,8 +308,7 @@ sub plv2hash }); } # plv2hash -sub summary -{ +sub summary { my $conf = shift || myconfig (); ref $conf eq "HASH" && exists $conf->{config} && exists $conf->{build} or return; @@ -321,14 +320,14 @@ sub summary d_longdbl d_longlong use64bitall use64bitint useithreads uselongdouble usemultiplicity usemymalloc useperlio useshrplib doublesize intsize ivsize nvsize longdblsize longlongsize lseeksize + default_inc_excludes_dot ); $info{$_}++ for grep { $conf->{build}{options}{$_} } keys %{$conf->{build}{options}}; return \%info; } # summary -sub signature -{ +sub signature { eval { require Digest::MD5 }; $@ and return "00000000000000000000000000000000"; @@ -339,8 +338,7 @@ sub signature } sort keys %$conf); } # signature -sub myconfig -{ +sub myconfig { my $args = shift; my %args = ref $args eq "HASH" ? %$args : ref $args eq "ARRAY" ? @$args : (); diff --git a/cpan/Config-Perl-V/t/30_plv5240.t b/cpan/Config-Perl-V/t/30_plv5240.t index a730d240f0..b43b46f518 100644 --- a/cpan/Config-Perl-V/t/30_plv5240.t +++ b/cpan/Config-Perl-V/t/30_plv5240.t @@ -5,7 +5,7 @@ use warnings; BEGIN { use Test::More; - my $tests = 117; + my $tests = 125; unless ($ENV{PERL_CORE}) { require Test::NoWarnings; Test::NoWarnings->import (); @@ -15,7 +15,7 @@ BEGIN { plan tests => $tests; } -use Config::Perl::V; +use Config::Perl::V qw( summary ); ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block"); ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); @@ -64,9 +64,16 @@ my %check = ( osvers => "4.5.2-1-default", use64bitall => "define", use64bitint => "define", + usemymalloc => "n", + default_inc_excludes_dot + => "undef", ); is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check; +ok (my $info = summary ($conf), "A summary"); +ok (exists $info->{$_}, "Summary has $_") for qw( cc config_args usemymalloc default_inc_excludes_dot ); +is ($info->{default_inc_excludes_dot}, "undef", "This build has . in INC"); + __END__ Summary of my perl5 (revision 5 version 24 subversion 0) configuration: diff --git a/cpan/Config-Perl-V/t/31_plv52511.t b/cpan/Config-Perl-V/t/31_plv52511.t new file mode 100644 index 0000000000..b3c09cd522 --- /dev/null +++ b/cpan/Config-Perl-V/t/31_plv52511.t @@ -0,0 +1,182 @@ +#!/pro/bin/perl + +use strict; +use warnings; + +BEGIN { + use Test::More; + my $tests = 125; + unless ($ENV{PERL_CORE}) { + require Test::NoWarnings; + Test::NoWarnings->import (); + $tests++; + } + + plan tests => $tests; + } + +use Config::Perl::V qw( summary ); + +ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block"); +ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); + +is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); +is ($conf->{build}{stamp}, "Feb 27 2017 15:02:41", "Build time"); +is ($conf->{config}{version}, "5.25.11", "reconstructed \$Config{version}"); + +my $opt = Config::Perl::V::plv2hash ("")->{build}{options}; +foreach my $o (sort qw( + DEBUGGING HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE + PERL_DONT_CREATE_GVSV PERL_TRACK_MEMPOOL PERL_IMPLICIT_CONTEXT + PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV PERL_USE_DEVEL + USE_64_BIT_ALL + USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE + USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME + USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API + )) { + is ($conf->{build}{options}{$o}, 1, "Runtime option $o set"); + delete $opt->{$o}; + } +foreach my $o (sort keys %$opt) { + is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset"); + } + +is_deeply ($conf->{build}{patches}, + [ "SMOKEaa9ac6cf00899a6f55881d4ca6c1214215dc83ee" ], "Local patches"); + +my %check = ( + alignbytes => 16, + api_version => 25, + bincompat5005 => "undef", + byteorder => 12345678, + cc => "cc", + cccdlflags => "-fPIC", + ccdlflags => "-Wl,-E", + config_args => "-des -Dusedevel -Duseithreads -Duse64bitall -Duselongdouble -DDEBUGGING", + gccversion => "6.3.1 20170202 [gcc-6-branch revision 245119]", + gnulibc_version => "2.24", + ivsize => 8, + ivtype => "long", + ld => "cc", + lddlflags => "-shared -O2 -g -L/pro/local/lib -fstack-protector-strong", + ldflags => "-L/pro/local/lib -fstack-protector-strong", + libc => "libc-2.24.so", + lseektype => "off_t", + osvers => "4.10.0-1-default", + use64bitall => "define", + use64bitint => "define", + usemymalloc => "n", + default_inc_excludes_dot + => "undef", + ); +is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check; + +ok (my $info = summary ($conf), "A summary"); +ok (exists $info->{$_}, "Summary has $_") for qw( cc config_args usemymalloc default_inc_excludes_dot ); +is ($info->{default_inc_excludes_dot}, "undef", "This build has . in INC"); + +__END__ +Summary of my perl5 (revision 5 version 25 subversion 11) configuration: + Snapshot of: aa9ac6cf00899a6f55881d4ca6c1214215dc83ee + Platform: + osname=linux + osvers=4.10.0-1-default + archname=x86_64-linux-thread-multi-ld + uname='linux lx09 4.10.0-1-default #1 smp preempt mon feb 20 16:47:26 utc 2017 (81ace5a) x86_64 x86_64 x86_64 gnulinux ' + config_args='-des -Dusedevel -Duseithreads -Duse64bitall -Duselongdouble -DDEBUGGING' + hint=recommended + useposix=true + d_sigaction=define + useithreads=define + usemultiplicity=define + use64bitint=define + use64bitall=define + uselongdouble=define + usemymalloc=n + default_inc_excludes_dot=undef + bincompat5005=undef + Compiler: + cc='cc' + ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -DDEBUGGING -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' + optimize='-O2 -g' + cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -DDEBUGGING -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/pro/local/include' + ccversion='' + gccversion='6.3.1 20170202 [gcc-6-branch revision 245119]' + gccosandvers='' + intsize=4 + longsize=8 + ptrsize=8 + doublesize=8 + byteorder=12345678 + doublekind=3 + d_longlong=define + longlongsize=8 + d_longdbl=define + longdblsize=16 + longdblkind=3 + ivtype='long' + ivsize=8 + nvtype='long double' + nvsize=16 + Off_t='off_t' + lseeksize=8 + alignbytes=16 + prototype=define + Linker and Libraries: + ld='cc' + ldflags ='-L/pro/local/lib -fstack-protector-strong' + libpth=/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/6/include-fixed /usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/lib /usr/lib /pro/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64 + libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat + perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc + libc=libc-2.24.so + so=so + useshrplib=false + libperl=libperl.a + gnulibc_version='2.24' + Dynamic Linking: + dlsrc=dl_dlopen.xs + dlext=so + d_dlsymun=undef + ccdlflags='-Wl,-E' + cccdlflags='-fPIC' + lddlflags='-shared -O2 -g -L/pro/local/lib -fstack-protector-strong' + + +Characteristics of this binary (from libperl): + Compile-time options: + DEBUGGING + HAS_TIMES + MULTIPLICITY + PERLIO_LAYERS + PERL_COPY_ON_WRITE + PERL_DONT_CREATE_GVSV + PERL_IMPLICIT_CONTEXT + PERL_MALLOC_WRAP + PERL_OP_PARENT + PERL_PRESERVE_IVUV + PERL_TRACK_MEMPOOL + PERL_USE_DEVEL + USE_64_BIT_ALL + USE_64_BIT_INT + USE_ITHREADS + USE_LARGE_FILES + USE_LOCALE + USE_LOCALE_COLLATE + USE_LOCALE_CTYPE + USE_LOCALE_NUMERIC + USE_LOCALE_TIME + USE_LONG_DOUBLE + USE_PERLIO + USE_PERL_ATOF + USE_REENTRANT_API + Locally applied patches: + SMOKEaa9ac6cf00899a6f55881d4ca6c1214215dc83ee + Built under linux + Compiled at Feb 27 2017 15:02:41 + @INC: + lib + /pro/lib/perl5/site_perl/5.25.11/x86_64-linux-thread-multi-ld + /pro/lib/perl5/site_perl/5.25.11 + /pro/lib/perl5/5.25.11/x86_64-linux-thread-multi-ld + /pro/lib/perl5/5.25.11 + . |