[libdist-zilla-util-configdumper-perl] 03/03: dont report empty config payloads

Florian Schlichting fsfs at moszumanska.debian.org
Sat Nov 11 15:43:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to annotated tag 0.003004-source
in repository libdist-zilla-util-configdumper-perl.

commit ac018491277ef2367df0e5c170884e8a70ac943d
Author: Kent Fredric <kentfredric at gmail.com>
Date:   Mon Sep 1 09:15:17 2014 +1200

    dont report empty config payloads
---
 Changes                             | 2 ++
 dist.ini                            | 2 ++
 dist.ini.meta                       | 2 +-
 lib/Dist/Zilla/Util/ConfigDumper.pm | 4 +++-
 t/basic_role_attr.t                 | 1 -
 t/failattr.t                        | 1 -
 6 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Changes b/Changes
index 39bf1b5..1db5199 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 Release history for Dist-Zilla-Util-ConfigDumper
 
 {{$NEXT}}
+ [Bugfix]
+ - Don't report empty config payloads.
 
 0.003003 2014-08-30T14:20:07Z
  [Bugfix]
diff --git a/dist.ini b/dist.ini
index 2ddee16..ea3e73a 100644
--- a/dist.ini
+++ b/dist.ini
@@ -5,6 +5,8 @@ author = Kent Fredric <kentnl at cpan.org>
 license = Perl_5
 copyright_holder = Kent Fredric <kentfredric at gmail.com>
 
+[Bootstrap::lib]
+
 [MetaConfig / @Author::KENTNL/MetaConfig]
 
 [GithubMeta / @Author::KENTNL/GithubMeta]
diff --git a/dist.ini.meta b/dist.ini.meta
index 8d7b13d..a45fec5 100644
--- a/dist.ini.meta
+++ b/dist.ini.meta
@@ -5,7 +5,7 @@ license          = Perl_5
 copyright_holder = Kent Fredric <kentfredric at gmail.com>
 
 ; Uncomment this to bootstrap via self
-; [Bootstrap::lib]
+[Bootstrap::lib]
 
 [@Author::KENTNL]
 :version          = 2.020000
diff --git a/lib/Dist/Zilla/Util/ConfigDumper.pm b/lib/Dist/Zilla/Util/ConfigDumper.pm
index 62735e5..c029e76 100644
--- a/lib/Dist/Zilla/Util/ConfigDumper.pm
+++ b/lib/Dist/Zilla/Util/ConfigDumper.pm
@@ -73,7 +73,9 @@ sub config_dumper {
     for my $test (@tests) {
       $test->( $self, $payload, \@fails );
     }
-    $cnf->{$package} = $payload;
+    if ( keys %{$payload} ) {
+      $cnf->{$package} = $payload;
+    }
     if (@fails) {
       $cnf->{$CFG_PACKAGE} = {} unless exists $cnf->{$CFG_PACKAGE};
       $cnf->{$CFG_PACKAGE}->{$package} = {} unless exists $cnf->{$CFG_PACKAGE};
diff --git a/t/basic_role_attr.t b/t/basic_role_attr.t
index 06730ef..1db95b7 100644
--- a/t/basic_role_attr.t
+++ b/t/basic_role_attr.t
@@ -57,7 +57,6 @@ $t->meta_path_deeply(
   [
     {
       'Dist::Zilla::Plugin::TestPlugin' => { 'childattr' => 'Rainbows and lollypops, etc' },
-      'Dist::Zilla::Role::TestRole'     => {},
     }
   ],
   "Plugin list expected"
diff --git a/t/failattr.t b/t/failattr.t
index 6821f9c..be0310d 100644
--- a/t/failattr.t
+++ b/t/failattr.t
@@ -40,7 +40,6 @@ $t->meta_path_deeply(
   '/x_Dist_Zilla/plugins/*/*[ key eq \'class\' and value eq \'Dist::Zilla::Plugin::TestPlugin\' ]/../*[ key eq \'config\']',
   [
     {
-      'Dist::Zilla::Plugin::TestPlugin' => {},
       'Dist::Zilla::Util::ConfigDumper' => {
         'Dist::Zilla::Plugin::TestPlugin' => { 'failed' => ['attr'] }
       },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-util-configdumper-perl.git



More information about the Pkg-perl-cvs-commits mailing list