From 577d436a386cb60ff2ba41ba987200dad4083d8a Mon Sep 17 00:00:00 2001 From: David Golden Date: Mon, 8 Jun 2015 22:49:05 -0600 Subject: [PATCH] provide better diagnostics on PAUSE config file error --- lib/Dist/Zilla/Plugin/UploadToCPAN.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Dist/Zilla/Plugin/UploadToCPAN.pm b/lib/Dist/Zilla/Plugin/UploadToCPAN.pm index c2bdd80a3..19161a042 100644 --- a/lib/Dist/Zilla/Plugin/UploadToCPAN.pm +++ b/lib/Dist/Zilla/Plugin/UploadToCPAN.pm @@ -175,9 +175,11 @@ has pause_cfg => ( my $file = $self->pause_cfg_file; $file = File::Spec->catfile($self->pause_cfg_dir, $file) unless File::Spec->file_name_is_absolute($file); + return {} unless -e $file && -r _; my $cfg = try { CPAN::Uploader->read_config_file($file) } catch { + $self->log("Couldn't load credentials from '$file': $_"); {}; }; return $cfg;