AlexBio/Dist-Zilla-Plugin-GitHub — Issue #8: Feature Request: Use dummy values when offline
Author: thaljef
Created: 2011-12-15 07:12:44+00:00
State: open

I have one more request, but I don't yet have time to implement myself...

The Pod::Weaver::Section::Support plugin throws a fatal error if it does not find the right metadata. Usually, I have D::Z::Plugin::GitHub::Meta provide that metadata. But if I'm offline, then Github::Meta doesn't provide any metadata and DZ blows up. It usually looks something like this:

[DZ] beginning to build Dist-Zilla-Chef
[DZ] dist's main_module is lib/Dist/Zilla/Chef.pm
[DZ] extracting distribution abstract from lib/Dist/Zilla/Chef.pm
[GitHub::Meta] Getting GitHub repository info
[GitHub::Meta] Err: Can't connect to GitHub.com
[DZ] No bugtracker in metadata!

So this basically means I can't build my dist when I'm offline (unless I tweak my dist.ini). Obviously, that is a major hassle. So I propose that Github::Meta should provide some dummy values for the metadata, if it can't get a response from GitHub. You might also throw in a prompt to ask whether to use the dummy values or abort the build.