Hello community,

here is the log from the commit of package perl-Config-GitLike for 
openSUSE:Factory checked in at 2017-08-10 14:03:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Config-GitLike (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Config-GitLike.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Config-GitLike"

Thu Aug 10 14:03:48 2017 rev:10 rq:512163 version:1.17

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Config-GitLike/perl-Config-GitLike.changes  
2015-04-18 10:40:23.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Config-GitLike.new/perl-Config-GitLike.changes 
    2017-08-10 14:11:57.817632242 +0200
@@ -1,0 +2,13 @@
+Wed Jul 19 05:14:08 UTC 2017 - co...@suse.com
+
+- updated to 1.17
+   see /usr/share/doc/packages/perl-Config-GitLike/Changes
+
+  1.17 2017-07-16
+   - Read and write files with non-UNIX-newlines
+   - Filter multiple values correctly when using `get_regexp`
+   - Throw an error when `get` is passed no section
+   - Perl 5.28.0 compatibility, by pushing '.' into @INC in Makefile.PL
+     for Module::Install
+
+-------------------------------------------------------------------

Old:
----
  Config-GitLike-1.16.tar.gz

New:
----
  Config-GitLike-1.17.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Config-GitLike.spec ++++++
--- /var/tmp/diff_new_pack.aGncla/_old  2017-08-10 14:11:58.501535950 +0200
+++ /var/tmp/diff_new_pack.aGncla/_new  2017-08-10 14:11:58.513534261 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Config-GitLike
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           perl-Config-GitLike
-Version:        1.16
+Version:        1.17
 Release:        0
 %define cpan_name Config-GitLike
 Summary:        Git-Compatible Config File Parsing
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Config-GitLike/
-Source0:        
http://www.cpan.org/authors/id/A/AL/ALEXMV/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/A/AL/ALEXMV/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -57,16 +57,16 @@
 overriding methods you can obtain any combination of configuration files.
 By default, configuration files that don't exist are just skipped.
 
-See the
+See
 http://www.kernel.org/pub/software/scm/git/docs/git-config.html#_configurat
-ion_file manpage for details on the syntax of git configuration files. We
-won't waste pixels on the nitty gritty here.
+ion_file for details on the syntax of git configuration files. We won't
+waste pixels on the nitty gritty here.
 
 While the behavior of a couple of this module's methods differ slightly
 from the 'git config' equivalents, this module can read any config file
 written by git. The converse is usually true, but only if you don't take
 advantage of this module's increased permissiveness when it comes to key
-names. (See the DIFFERENCES FROM GIT-CONFIG manpage for details.)
+names. (See DIFFERENCES FROM GIT-CONFIG for details.)
 
 This is an object-oriented module using Moo. All subroutines are object
 method calls.

++++++ Config-GitLike-1.16.tar.gz -> Config-GitLike-1.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/Changes 
new/Config-GitLike-1.17/Changes
--- old/Config-GitLike-1.16/Changes     2015-02-17 01:47:10.000000000 +0100
+++ new/Config-GitLike-1.17/Changes     2017-07-17 03:36:04.000000000 +0200
@@ -1,5 +1,12 @@
 Revision history for perl module Config::GitLike
 
+1.17 2017-07-16
+ - Read and write files with non-UNIX-newlines
+ - Filter multiple values correctly when using `get_regexp`
+ - Throw an error when `get` is passed no section
+ - Perl 5.28.0 compatibility, by pushing '.' into @INC in Makefile.PL
+   for Module::Install
+
 1.16 2015-02-16
  - Canonicalize paths using File::Spec->canonpath; this addresses
    failures on Windows where /-separated paths were stored in the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/MANIFEST 
new/Config-GitLike-1.17/MANIFEST
--- old/Config-GitLike-1.16/MANIFEST    2015-02-17 01:48:22.000000000 +0100
+++ new/Config-GitLike-1.17/MANIFEST    2017-07-17 03:37:24.000000000 +0200
@@ -17,8 +17,13 @@
 t/00_use.t
 t/casing.t
 t/comment.t
+t/dos.conf
 t/encoding.t
+t/get_regexp_filter_multiple.t
 t/lib/TestConfig.pm
+t/mac.conf
+t/platforms.t
 t/t1300-repo-config.t
+t/unix.conf
 t/util/translate.pl
 SIGNATURE                                Public-key signature (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/META.yml 
new/Config-GitLike-1.17/META.yml
--- old/Config-GitLike-1.16/META.yml    2015-02-17 01:47:45.000000000 +0100
+++ new/Config-GitLike-1.17/META.yml    2017-07-17 03:36:17.000000000 +0200
@@ -9,7 +9,7 @@
   ExtUtils::MakeMaker: 6.59
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.14'
+generated_by: 'Module::Install version 1.18'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,4 +27,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://github.com/bestpractical/config-gitlike
-version: '1.16'
+version: '1.17'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/Makefile.PL 
new/Config-GitLike-1.17/Makefile.PL
--- old/Config-GitLike-1.16/Makefile.PL 2013-09-16 22:05:22.000000000 +0200
+++ new/Config-GitLike-1.17/Makefile.PL 2017-07-17 01:12:07.000000000 +0200
@@ -1,3 +1,4 @@
+BEGIN { push @INC, '.' }
 use inc::Module::Install;
 name('Config-GitLike');
 all_from('lib/Config/GitLike.pm');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/SIGNATURE 
new/Config-GitLike-1.17/SIGNATURE
--- old/Config-GitLike-1.16/SIGNATURE   2015-02-17 01:48:22.000000000 +0100
+++ new/Config-GitLike-1.17/SIGNATURE   2017-07-17 03:37:24.000000000 +0200
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.73.
+signed via the Module::Signature module, version 0.79.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -12,35 +12,50 @@
 not run its Makefile.PL or Build.PL.
 
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA512
 
-SHA1 1f64bbefe5ddfe61d260cfbc49499401980f31af Changes
-SHA1 a5f44319e842c051869036cc24fc6e336166716b MANIFEST
-SHA1 3e6608c0877c6cbda4a49a2c8723d58c2631bb46 META.yml
-SHA1 4519a356848fefbe4023d2df67470e756b8e6d7f Makefile.PL
-SHA1 d2664c57b65686abbfbbe1e71229761625be4922 inc/Module/Install.pm
-SHA1 da41a8d9904f7b409b49a5f6c338d3eb305a2b4b inc/Module/Install/Base.pm
-SHA1 0db0afe19cd298abba248fa089e5525bd5ab3ab6 inc/Module/Install/Can.pm
+SHA1 917fa846691295e7c7f386d2417cc4df46c64257 Changes
+SHA1 671ffd9e57a56b87c3aa6c311274770bc4ec0b75 MANIFEST
+SHA1 3274a397ad59d7854e333d7f780b63914662cd6b META.yml
+SHA1 52cb72683bcd12cb0eb441f2b31f08bceb87a2d0 Makefile.PL
+SHA1 fb87e7e7964647af0e7f6422bc7943754935dca7 inc/Module/Install.pm
+SHA1 06ca84c52f555dfd7cf8bb7c941c975e25adfc9d inc/Module/Install/Base.pm
+SHA1 3eeb29878c8a435182b492e22315166a0229a373 inc/Module/Install/Can.pm
 SHA1 b3839b235991bae672b2db69de102cccef72ef8f inc/Module/Install/ExtraTests.pm
-SHA1 e7152bfd5ca67d0e33f96d09c59d600bca5c1f15 inc/Module/Install/Fetch.pm
-SHA1 29ee1cb0dc262b00983e3a2f5cf00b538dff5069 inc/Module/Install/Makefile.pm
-SHA1 e963f80cfe255f16e55067d1feb6841cff3ed2fe inc/Module/Install/Metadata.pm
-SHA1 65a1f09af1f4f9e47a98b6b45667c328b1b2f9c0 inc/Module/Install/Win32.pm
-SHA1 f191c49475b3f51775180cd4f7e41e3bdab7f85a inc/Module/Install/WriteAll.pm
-SHA1 86923faf8b945efe9277bc4d9a76fd4e561b89b7 lib/Config/GitLike.pm
+SHA1 3bb596078a0413cc568ff3a834d9fc54dbddd54b inc/Module/Install/Fetch.pm
+SHA1 5885b5a7af6c3d54cbeb1274a896a565e5cbdb9a inc/Module/Install/Makefile.pm
+SHA1 9247628a32ad889e815a356fb39b2bc94ff3cc3a inc/Module/Install/Metadata.pm
+SHA1 b0b3ad3cfea40b508eb61e0e5c8ea477f81f3eb1 inc/Module/Install/Win32.pm
+SHA1 b162866505fb2a1141efa422cfdc864394cb4444 inc/Module/Install/WriteAll.pm
+SHA1 00dc2b5afaf35b72c9e54af90a43e8338c94206a lib/Config/GitLike.pm
 SHA1 806e7cb2ac15a460866e1e1c9c3984ad41d2f850 lib/Config/GitLike/Cascaded.pm
 SHA1 a15b556bdedea16668a170ea52e2ff6f415b7295 lib/Config/GitLike/Git.pm
 SHA1 8c30f69743e7a9d743d7206f2306ff9f12bb59a0 t/00_use.t
-SHA1 c790ef9b8eacf745879d8a2d21811804b2ac5ffe t/casing.t
+SHA1 6b2873180b2db6e0a122e5874fc74927c4470355 t/casing.t
 SHA1 34c0acc86d479971c0723abac2dc4bbbca3247bb t/comment.t
+SHA1 8b2803a04139668a93eeead8e90ab2ce53e599f1 t/dos.conf
 SHA1 0e98fd5383d929fbe63e3513a7697478c3abbf51 t/encoding.t
+SHA1 0813010c4459e7e7e1824283eb4ea36f6b5c1391 t/get_regexp_filter_multiple.t
 SHA1 e884df4ffae7428768c76b54882ba3872d5a3b47 t/lib/TestConfig.pm
+SHA1 b086291482ee5dca0ca4e5dfb8dc65291c8cd560 t/mac.conf
+SHA1 b82ae53518889fc295b4cd59e923151e2e289cbd t/platforms.t
 SHA1 24a4fbfdeb3268280fa1a10ac5934274c33a9a55 t/t1300-repo-config.t
+SHA1 8d0a69c0b80d383ba1fb5a60ca3beb2edf0668b0 t/unix.conf
 SHA1 53b21b0f0227909dd299d8adb033f5aff8f5fc42 t/util/translate.pl
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
-iEYEARECAAYFAlTij9YACgkQMflWJZZAbqDD8ACeKu7CBgcwfljj5GxgTrMxUyfB
-IWIAnj6t4YesqsWvnZFTW5J5TlCXwrc7
-=MIzZ
+iQIcBAEBCgAGBQJZbBTUAAoJEJHs6NvKxcMFMmAP/j98nI/9O5ALjiDs1kDpfTkv
+DPZ2VidojTtBW7vWS9uI9jXMFMYvdm8YpgF1QzJ7o1wjWF2Gl+OQBTeAKDoP4bZR
+/IgrnICTBPfiRWEEIDy8C5Ue5M+er0rJTb0UgLxc0Jb3vif3wUuSBvkngY8R39k4
+6gxa41mAgCy3g887samjmtD0/3kNx088JngO+NXRniXs3xILopnacXkjrYhGcgkD
+uqJkGnxNG6IB1q4b7L8/l4aUy7f1tDOc2SrxHbFAaWT4OJRP5PWl3bL2FTNbcQIT
+Aen5fcIV7fpapYaEtb4QTwdFui7rCF1li7W7e9QNDRvVwMYPhlexH1azswyijVoc
+rSJeN15h/pBL0sQTDvTE+Tbucgsfs81ExicMYDr3HkKBCa4vrf90bgSlrL375ixz
+jsEmNdc8BSaWFe55g/9bcPFlOpskydsm4juFk6B3rI+AKhZwVmeLEvb2dEUGttvY
+XGGIzYO+WzZCinfHFBNxPRCtkgcqdlenzDlpAhI3yspAo9tYpZGmbEZiTFusD1Z6
+/FVljS/pXnBz76uDKs6s1GmsGKL2k94E+YUepkalYV2x3jzEzSETqSp59FQd+OEC
+uA1NdvIPScE0hqRuxQGg7S7INqZyxgv+XgVRq4XTQQLLlBaFS3wuSQ9GZZBbFqFC
+u+zhkpKpBTPfFSKa4z+b
+=w7MY
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/Base.pm 
new/Config-GitLike-1.17/inc/Module/Install/Base.pm
--- old/Config-GitLike-1.16/inc/Module/Install/Base.pm  2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/Base.pm  2017-07-17 
03:36:17.000000000 +0200
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
 }
 
 # Suspend handler for "redefined" warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/Can.pm 
new/Config-GitLike-1.17/inc/Module/Install/Can.pm
--- old/Config-GitLike-1.16/inc/Module/Install/Can.pm   2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/Can.pm   2017-07-17 
03:36:17.000000000 +0200
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -121,6 +121,15 @@
 # Can we locate a (the) C compiler
 sub can_cc {
        my $self   = shift;
+
+       if ($^O eq 'VMS') {
+               require ExtUtils::CBuilder;
+               my $builder = ExtUtils::CBuilder->new(
+               quiet => 1,
+               );
+               return $builder->have_compiler;
+       }
+
        my @chunks = split(/ /, $Config::Config{cc}) or return;
 
        # $Config{cc} may contain args; try to find out the program part
@@ -151,4 +160,4 @@
 
 __END__
 
-#line 236
+#line 245
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/Fetch.pm 
new/Config-GitLike-1.17/inc/Module/Install/Fetch.pm
--- old/Config-GitLike-1.16/inc/Module/Install/Fetch.pm 2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/Fetch.pm 2017-07-17 
03:36:17.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/Makefile.pm 
new/Config-GitLike-1.17/inc/Module/Install/Makefile.pm
--- old/Config-GitLike-1.16/inc/Module/Install/Makefile.pm      2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/Makefile.pm      2017-07-17 
03:36:17.000000000 +0200
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/Metadata.pm 
new/Config-GitLike-1.17/inc/Module/Install/Metadata.pm
--- old/Config-GitLike-1.16/inc/Module/Install/Metadata.pm      2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/Metadata.pm      2017-07-17 
03:36:17.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/Win32.pm 
new/Config-GitLike-1.17/inc/Module/Install/Win32.pm
--- old/Config-GitLike-1.16/inc/Module/Install/Win32.pm 2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/Win32.pm 2017-07-17 
03:36:17.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install/WriteAll.pm 
new/Config-GitLike-1.17/inc/Module/Install/WriteAll.pm
--- old/Config-GitLike-1.16/inc/Module/Install/WriteAll.pm      2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install/WriteAll.pm      2017-07-17 
03:36:17.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.14';
+       $VERSION = '1.18';
        @ISA     = qw{Module::Install::Base};
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/inc/Module/Install.pm 
new/Config-GitLike-1.17/inc/Module/Install.pm
--- old/Config-GitLike-1.16/inc/Module/Install.pm       2015-02-17 
01:47:44.000000000 +0100
+++ new/Config-GitLike-1.17/inc/Module/Install.pm       2017-07-17 
03:36:16.000000000 +0200
@@ -31,7 +31,7 @@
        # This is not enforced yet, but will be some time in the next few
        # releases once we can make sure it won't clash with custom
        # Module::Install extensions.
-       $VERSION = '1.14';
+       $VERSION = '1.18';
 
        # Storage for the pseudo-singleton
        $MAIN    = undef;
@@ -244,6 +244,8 @@
        }
        return $args{_self} if $args{_self};
 
+       $base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS';
+
        $args{dispatch} ||= 'Admin';
        $args{prefix}   ||= 'inc';
        $args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
@@ -322,7 +324,7 @@
        my ($self, $path) = @_;
 
        my @found;
-       File::Find::find( sub {
+       File::Find::find( {no_chdir => 1, wanted => sub {
                my $file = $File::Find::name;
                return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
                my $subpath = $1;
@@ -336,7 +338,7 @@
                # correctly.  Otherwise, root through the file to locate the 
case-preserved
                # version of the package name.
                if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
-                       my $content = Module::Install::_read($subpath . '.pm');
+                       my $content = Module::Install::_read($File::Find::name);
                        my $in_pod  = 0;
                        foreach ( split /\n/, $content ) {
                                $in_pod = 1 if /^=\w/;
@@ -351,7 +353,7 @@
                }
 
                push @found, [ $file, $pkg ];
-       }, $path ) if -d $path;
+       }}, $path ) if -d $path;
 
        @found;
 }
@@ -373,8 +375,6 @@
        return $call;
 }
 
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _read {
        local *FH;
        open( FH, '<', $_[0] ) or die "open($_[0]): $!";
@@ -383,16 +383,6 @@
        close FH or die "close($_[0]): $!";
        return $string;
 }
-END_NEW
-sub _read {
-       local *FH;
-       open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
-       binmode FH;
-       my $string = do { local $/; <FH> };
-       close FH or die "close($_[0]): $!";
-       return $string;
-}
-END_OLD
 
 sub _readperl {
        my $string = Module::Install::_read($_[0]);
@@ -413,8 +403,6 @@
        return $string;
 }
 
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
        local *FH;
        open( FH, '>', $_[0] ) or die "open($_[0]): $!";
@@ -424,17 +412,6 @@
        }
        close FH or die "close($_[0]): $!";
 }
-END_NEW
-sub _write {
-       local *FH;
-       open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
-       binmode FH;
-       foreach ( 1 .. $#_ ) {
-               print FH $_[$_] or die "print($_[0]): $!";
-       }
-       close FH or die "close($_[0]): $!";
-}
-END_OLD
 
 # _version is for processing module versions (eg, 1.03_05) not
 # Perl versions (eg, 5.8.1).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/lib/Config/GitLike.pm 
new/Config-GitLike-1.17/lib/Config/GitLike.pm
--- old/Config-GitLike-1.16/lib/Config/GitLike.pm       2015-02-17 
01:47:28.000000000 +0100
+++ new/Config-GitLike-1.17/lib/Config/GitLike.pm       2017-07-17 
03:33:50.000000000 +0200
@@ -8,7 +8,7 @@
 use Fcntl qw(O_CREAT O_EXCL O_WRONLY);
 use 5.008;
 
-our $VERSION = '1.16';
+our $VERSION = '1.17';
 
 
 has 'confname' => (
@@ -70,6 +70,12 @@
     isa => Maybe[Str],
 );
 
+has 'newlines' => (
+    is => 'rw',
+    isa => HashRef,
+    default => sub { +{} },
+);
+
 has 'include' => (
     is => 'rw',
     isa => Str,
@@ -165,6 +171,19 @@
 
     my $c = do {local $/; <$fh>};
 
+    my $newlines = "\n";
+    if ($c =~ m/\r\n/) {
+        # Convert from DOS; `git` applies this on read always, and
+        # simply mangles files on write.
+        $newlines = "\r\n";
+        $c =~ s/\r\n/\n/g;
+    } elsif ($c !~ /\n/ and $c =~ /\r/) {
+        # Best-guess convert from Mac.
+        $newlines = "\r";
+        $c =~ s/\r/\n/g;
+    }
+    $self->newlines->{$filename} = $newlines;
+
     $c =~ s/\n*$/\n/; # Ensure it ends with a newline
 
     return $c;
@@ -675,14 +694,26 @@
         }
         elsif ($args{filter} =~ s/^!//) {
             for (keys %results) {
-                delete $results{$_} if defined $results{$_}
-                    and $results{$_} =~ m/$args{filter}/i;
+                my @values = ref $results{$_} ? @{$results{$_}} : $results{$_};
+                @values = grep { not defined or not m/$args{filter}/i } 
@values;
+                if (!@values) {
+                    delete $results{$_};
+                }
+                else {
+                    $results{$_} = @values > 1 ? \@values : $values[0];
+                }
             }
         }
         else {
             for (keys %results) {
-                delete $results{$_} if not defined $results{$_}
-                    or $results{$_} !~ m/$args{filter}/i;
+                my @values = ref $results{$_} ? @{$results{$_}} : $results{$_};
+                @values = grep { defined and m/$args{filter}/i } @values;
+                if (!@values) {
+                    delete $results{$_};
+                }
+                else {
+                    $results{$_} = @values > 1 ? \@values : $values[0];
+                }
             }
         }
     }
@@ -706,6 +737,8 @@
     my $self = shift;
     my ($key) = @_;
     my ($section, $subsection, $name) = _split_key($key);
+    die "No section given in key: $key\n" unless $section;
+
     return join( '.',
         grep { defined } (lc $section, $subsection, lc $name),
     );
@@ -1077,6 +1110,8 @@
     my $self = shift;
     my($filename, $content) = @_;
 
+    my $newlines = $self->newlines->{$filename} || "\n";
+    $content =~ s/\n/$newlines/g if $newlines ne "\n";
     # allow nested symlinks but only within reason
     my $max_depth = 5;
 
@@ -1902,6 +1937,11 @@
 We don't support NUL-terminating output (the --null flag to
 git-config). Who needs it?
 
+Git only supports reading UNIX- and DOS-style newlines ("\n" and
+"\r\n"), and always uses "\n" when modifying files.  We also support
+reading Mac-style newlines ("\r"), and write updates to files using
+the same newlines as they were read with.
+
 =head1 BUGS
 
 If you find any bugs in this module, report them at:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/t/casing.t 
new/Config-GitLike-1.17/t/casing.t
--- old/Config-GitLike-1.16/t/casing.t  2014-05-21 01:07:01.000000000 +0200
+++ new/Config-GitLike-1.17/t/casing.t  2017-07-17 03:33:18.000000000 +0200
@@ -40,6 +40,10 @@
 is $config->original_key( 'core.FOObar' ), "core.FooBar",
     "Find original case when asked in different case";
 
+eval { $config->get( key => 'core') };
+ok my $err = $@, 'Should get an error when no section passed to get().';
+like $err, qr/No section given in key: core/,
+    'The missing section error should be correct';
 
 my $other_filename = File::Spec->catfile( $config_dirname, 'other' );
 $config->set(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/t/dos.conf 
new/Config-GitLike-1.17/t/dos.conf
--- old/Config-GitLike-1.16/t/dos.conf  1970-01-01 01:00:00.000000000 +0100
+++ new/Config-GitLike-1.17/t/dos.conf  2017-07-17 02:59:16.000000000 +0200
@@ -0,0 +1,5 @@
+[core]
+       engine = pg
+       topdir = sql
+[deploy]
+       verify = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/t/get_regexp_filter_multiple.t 
new/Config-GitLike-1.17/t/get_regexp_filter_multiple.t
--- old/Config-GitLike-1.16/t/get_regexp_filter_multiple.t      1970-01-01 
01:00:00.000000000 +0100
+++ new/Config-GitLike-1.17/t/get_regexp_filter_multiple.t      2017-07-17 
03:19:43.000000000 +0200
@@ -0,0 +1,187 @@
+# tests that serve to expose a problem with the interaction of filtering and
+# multiple values in get_regexp() in Config::GitLike 1.16
+
+use strict;
+use warnings;
+
+use File::Copy;
+use Test::More tests => 30;
+use Test::Exception;
+use File::Spec;
+use File::Temp qw/tempdir/;
+use lib 't/lib';
+use TestConfig;
+
+# create an empty test directory in /tmp
+my $config_dirname = tempdir( CLEANUP => !$ENV{CONFIG_GITLIKE_DEBUG} );
+my $config_filename = File::Spec->catfile( $config_dirname, 'config' );
+
+diag "config file is: $config_filename" if $ENV{TEST_VERBOSE};
+
+my $config
+    = TestConfig->new( confname => 'config', tmpdir => $config_dirname );
+
+$config->burp(
+    '# foo
+[section]
+       b = off
+       b = on
+       exact = 0
+       inexact = 01
+       delicieux = true
+'
+);
+
+$config->load;
+
+# 'delicieux' has only 1 value
+is_deeply(
+    scalar $config->get_all( key => 'section.delicieux' ),
+    ['true'], 'get all values for key delicieux'
+);
+
+is_deeply(
+    scalar $config->get_all( key => 'section.delicieux', filter => 'true' ),
+    ['true'], 'get all values for key delicieux, filter by regexp'
+);
+
+is_deeply(
+    scalar $config->get_all( key => 'section.delicieux', filter => 'false' ),
+    [], 'get all values for key delicieux, filter by regexp "false"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.delicieux' ),
+    { 'section.delicieux' => 'true' }, 'get all values for key delicieux by 
regexp'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.delicieux', filter => 'true' 
),
+    { 'section.delicieux' => 'true' }, 'get all values for key delicieux by 
regexp, filter by true'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.delicieux', filter => '!true' 
),
+    {}, 'get all values for key delicieux by regexp, filter by !true'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.delicieux', filter => 'false' 
),
+    {}, 'get all values for key delicieux by regexp, filter by false'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.delicieux', filter => 
'!false' ),
+    { 'section.delicieux' => 'true' }, 'get all values for key delicieux by 
regexp, filter by !false'
+);
+
+# 'b' has multiple values (2)
+is_deeply(
+    scalar $config->get_all( key => 'section.b' ),
+    ['off', 'on'], 'get all values for key b'
+);
+
+is_deeply(
+    scalar $config->get_all( key => 'section.b', filter => 'o' ),
+    ['off', 'on'], 'get all values for key b, filter by letter "o"'
+);
+
+is_deeply(
+    scalar $config->get_all( key => 'section.b', filter => 'n' ),
+    ['on'], 'get all values for key b, filter by letter "n"'
+);
+
+is_deeply(
+    scalar $config->get_all( key => 'section.b', filter => 'Q' ),
+    [], 'get all values for key b, filter by letter "Q"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by empty regex'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '.*' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by catch-all regex'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '^.*$' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by anchored catch-all regex'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => qr/(on|off)/ ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by regex on|off'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => qr/^(on|off)$/ 
),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by anchored regex on|off'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => 'o' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by letter "o"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => 'n' ),
+    { 'section.b' => 'on' }, 'get all values for key b by regexp, filter by 
letter "n"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => 'Q' ),
+    {}, 'get all values for key b by regexp, filter by letter "Q"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => 'ARRAY' ),
+    {}, 'get all values for key b by regexp, filter by word "ARRAY"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!' ),
+    {}, 'get all values for key b by regexp, filter by negated regex'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!.*' ),
+    {}, 'get all values for key b by regexp, filter by negated catch-all regex'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!(on|off)' ),
+    {}, 'get all values for key b by regexp, filter by "!(on|off)"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!on|off' ),
+    {}, 'get all values for key b by regexp, filter by "!on|off"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!good|bad' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by negated regex good|bad'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!o' ),
+    {}, 'get all values for key b by regexp, filter by "!o"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!n' ),
+    { 'section.b' => 'off' }, 'get all values for key b by regexp, filter by 
"!n"'
+);
+
+is_deeply(
+    scalar $config->get_regexp( key => 'section\.b', filter => '!ARRAY' ),
+    { 'section.b' => ['off', 'on'] }, 'get all values for key b by regexp, 
filter by "!ARRAY"'
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/t/mac.conf 
new/Config-GitLike-1.17/t/mac.conf
--- old/Config-GitLike-1.16/t/mac.conf  1970-01-01 01:00:00.000000000 +0100
+++ new/Config-GitLike-1.17/t/mac.conf  2017-07-17 02:59:22.000000000 +0200
@@ -0,0 +1 @@
+[core]
        engine = pg
        topdir = sql
[deploy]
        verify = true
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/t/platforms.t 
new/Config-GitLike-1.17/t/platforms.t
--- old/Config-GitLike-1.16/t/platforms.t       1970-01-01 01:00:00.000000000 
+0100
+++ new/Config-GitLike-1.17/t/platforms.t       2017-07-17 03:10:35.000000000 
+0200
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Config::GitLike;
+use File::Spec;
+
+for my $platform (qw(unix dos mac)) {
+    my $config_filename = File::Spec->catfile('t', "$platform.conf");
+    ok my $data = Config::GitLike->load_file($config_filename),
+        "Load $platform config";
+    is_deeply $data, {
+        'core.engine' => 'pg',
+        'core.topdir' => 'sql',
+        'deploy.verify' => 'true',
+    }, "Should have proper config for $platform file";
+}
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Config-GitLike-1.16/t/unix.conf 
new/Config-GitLike-1.17/t/unix.conf
--- old/Config-GitLike-1.16/t/unix.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/Config-GitLike-1.17/t/unix.conf 2017-07-17 02:59:25.000000000 +0200
@@ -0,0 +1,5 @@
+[core]
+       engine = pg
+       topdir = sql
+[deploy]
+       verify = true


Reply via email to