Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dist-Zilla CPAN distribution.

Report information
The Basics
Id: 59015
Status: resolved
Priority: 0/
Queue: Dist-Zilla

People
Owner: Nobody in particular
Requestors: SPAZM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.101811
Fixed in: (no value)



Subject: dzil setup fails
dzil setup fails trying to find the global configuration file for new users. Also dies trying to find log_fatal if configuration exists. mini% dzil setup Can't locate object method "_config_root" via package "Dist::Zilla::App" at /apps/perl5/lib/perl5/Dist/Zilla/App/Command/setup.pm line 28. === Raw 4.101811 code mini% dzil nop WARNING: No global configuration file was found in ~/.dzil -- this limits the ability of Dist::Zilla to perform some tasks. You can run "dzil setup" to create a simple first-pass configuration file, or you can touch the file ~/.dzil/config.ini to suppress this message in the future. no viable configuration could be found at /usr/local/share/perl/5.10.1/Config/MVP/Reader/Finder.pm line 47 mini% mkdir ~/.dzil && touch ~/.dzil/config.ini mini% dzil nop no viable configuration could be found at /usr/local/share/perl/5.10.1/Config/MVP/Reader/Finder.pm line 47 Config::MVP::Reader::Finder::_which_reader('Dist::Zilla::MVP::Reader::Finder=HASH(0x97a1f98)', 'Path::Class::File=HASH(0x977f590)') called at /usr/local/share/perl/5.10.1/Config/MVP/Reader/Finder.pm line 73 mini% dzil setup Can't locate object method "_config_root" via package "Dist::Zilla::App" at /apps/perl5/lib/perl5/Dist/Zilla/App/Command/setup.pm line 28. === new user after patch: mini% dzil nop WARNING: No global configuration file was found in ~/.dzil -- this limits the ability of Dist::Zilla to perform some tasks. You can run "dzil setup" to create a simple first-pass configuration file, or you can touch the file ~/.dzil/config.ini to suppress this message in the future. no viable configuration could be found at /usr/local/share/perl/5.10.1/Config/MVP/Reader/Finder.pm line 47 mini% mkdir ~/.dzil; touch ~/.dzil/config.ini mini% dzil nop no viable configuration could be found at /usr/local/share/perl/5.10.1/Config/MVP/Reader/Finder.pm line 47 Config::MVP::Reader::Finder::_which_reader('Dist::Zilla::MVP::Reader::Finder=HASH(0xb394800)', 'Path::Class::File=HASH(0xb36a758)') called at /usr/local/share/perl/5.10.1/Config/MVP/Reader/Finder.pm line 73 ... mini% dzil setup per-user configuration files already exist in /home/dwzl/.dzil: /home/dwzl/.dzil/config.ini at /apps/perl5/lib/perl5/Dist/Zilla/App/Command/setup.pm line 35 mini% rm ~/.dzil/config.ini mini% dzil setup ... works as expected, creates config.ini file.
git-format-patch output for patch. Brought to you by the Los Angeles Perl Mongers: June 30, 2010 meeting. http://la.pm.org
Subject: 0001-Correct-crash-when-running-dzil-setup-for-new-user.patch
From cf77907bee2b161d98e26afe5cb12a6efb604fa1 Mon Sep 17 00:00:00 2001 From: Andrew Grangaard <spazm@cpan.org> Date: Wed, 30 Jun 2010 20:30:20 -0700 Subject: [PATCH] Correct crash when running dzil setup for new user Update Dist-Zilla-4.101811 to use Dist::Zilla::Util to get the configuration root, instead of $self->app->_config_root, which is not defined. https://rt.cpan.org/Ticket/Display.html?id=59015 Bug 59015 Brought to you by the Los Angeles Perl Mongers: June 30, 2010 meeting. http://la.pm.org --- lib/Dist/Zilla/App/Command/setup.pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Dist/Zilla/App/Command/setup.pm b/lib/Dist/Zilla/App/Command/setup.pm index b37f903..bf36bce 100644 --- a/lib/Dist/Zilla/App/Command/setup.pm +++ b/lib/Dist/Zilla/App/Command/setup.pm @@ -3,6 +3,7 @@ use warnings; package Dist::Zilla::App::Command::setup; # ABSTRACT: set up a basic global config file use Dist::Zilla::App -command; +use Dist::Zilla::Util; =head1 SYNOPSIS @@ -32,13 +33,13 @@ sub execute { my $chrome = $self->app->chrome; - my $config_root = $self->app->_config_root; + my $config_root = Dist::Zilla::Util->_global_config_root; if ( my @files = grep { -f and $_->basename =~ /\Aconfig\./ } $config_root->children ) { - $chrome->log_fatal([ + $chrome->logger->log_fatal([ "per-user configuration files already exist in %s: %s", "$config_root", join(q{, }, @files), -- 1.7.0.4
thanks; some of this had already been fixed; I've applied the remaining fixes -- rjbs