145 lines
3.8 KiB
Diff
145 lines
3.8 KiB
Diff
From 29183497d2d3b99c7aba9792d10ca40bc172dba0 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
Date: Thu, 11 May 2017 08:59:13 +0200
|
|
Subject: [PATCH] Upgrade to 0.28
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Unbundled from perl-5.25.12.
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
---
|
|
V.pm | 24 +++++++++++-------------
|
|
t/30_plv5240.t | 11 +++++++++--
|
|
2 files changed, 20 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/V.pm b/V.pm
|
|
index c396f31..9e9c09c 100644
|
|
--- a/V.pm
|
|
+++ b/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/t/30_plv5240.t b/t/30_plv5240.t
|
|
index a730d24..b43b46f 100644
|
|
--- a/t/30_plv5240.t
|
|
+++ b/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:
|
|
|
|
--
|
|
2.9.3
|
|
|