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: 80113
Status: new
Priority: 0/
Queue: Dist-Zilla

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

Bug Information
Severity: Normal
Broken in: 4.300025
Fixed in: (no value)



Subject: Error Handler for config.ini errors suppresses root cause
The error handler for config.ini (  https://metacpan.org/source/RJBS/Dist-Zilla-4.300025/lib/Dist/Zilla/App.pm#L61 )  is perhaps useful in some cases, but its design suppresses  the causing error, leaving you with no realistic idea of what is actually wrong.

If your configuration seems impervious to the flaws discussed in this message, then you're just left confused as to what happened.

Additionally, the time at which the config loads is far too early for any -v verbosity parameter to take effect, so there's literally nothing a user can do with the defined Dzil interface to get more feedback on the problem.

The best you can do:  'perl -MCarp::Always -S dzil' instead of 'dzil'  ( This syntax chosen because its hard to set ENV variables on the command line in Win32 )

Then At least you get the obscured cause in the stacktrace ( mostly by dumb luck ):

> dzil new -P Author::KENTNL  My::Modname -v

Your global configuration file couldn't be loaded.  It's a file matching
~/.dzil/config.*

You can try deleting the file or you might need to upgrade from pre-version 4
format.  In most cases, this will just mean replacing [!release] with [%PAUSE]
and deleting any [!new] stanza.  You can also delete the existing file and run
"dzil setup"

> perl -MCarp::Always -S dzil new -P Author::KENTNL My::Modname -v

Your global configuration file couldn't be loaded.  It's a file matching
~/.dzil/config.*

You can try deleting the file or you might need to upgrade from pre-version 4
format.  In most cases, this will just mean replacing [!release] with [%PAUSE]
and deleting any [!new] stanza.  You can also delete the existing file and run
"dzil setup"
 at C:/strawberry/perl/site/lib/Dist/Zilla/App.pm line 62.
        Dist::Zilla::App::__ANON__('Attribute (password) is required at constructor Dist::Zilla::...') called at C:/strawberry/perl/vendor/lib/Try/Tiny.pm line 100
        Try::Tiny::try('CODE(0x46368e0)', 'Try::Tiny::Catch=REF(0x47c7fb8)') called at C:/strawberry/perl/site/lib/Dist/Zilla/App.pm line 72
        Dist::Zilla::App::_build_global_stashes('Dist::Zilla::App=HASH(0x3285788)') called at C:/strawberry/perl/site/lib/Dist/Zilla/App/Command/new.pm line 49
        Dist::Zilla::App::Command::new::execute('Dist::Zilla::App::Command::new=HASH(0x406a370)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x4091bf8)', 'ARRAY(0x24f4970)') called at C:/strawberry/perl/site/lib/App/Cmd.pm line 243
        App::Cmd::execute_command('Dist::Zilla::App=HASH(0x3285788)', 'Dist::Zilla::App::Command::new=HASH(0x406a370)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x4091bf8)', 'My::Modname') called at C:/strawberry/perl/site/lib/App/Cmd.pm line 171
        App::Cmd::run('Dist::Zilla::App') called at C:\strawberry\perl\site\bin/dzil line 12

config.ini I had was :

[%Rights]
license_class = Perl_5
copyright_holder = Kent Fredric <kentnl@cpan.org>

[%PAUSE]
user = KENTNL

 

and it wasn't obvious that my deletion of the password =     stanza was unsupported by [%PAUSE]

 



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.