Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 55951
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: yanick+cpan [...] babyl.dyndns.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: list recognized licenses if given an unknown one
I'm attaching a wee patch that lists all the known licenses if the one given in Build.PL is not recognized. The patch is also available in my github repo: http://github.com/yanick/Module-Build
Subject: license.diff
diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm index 7e28e1e..57c4490 100644 --- a/lib/Module/Build/Base.pm +++ b/lib/Module/Build/Base.pm @@ -3662,7 +3662,10 @@ sub do_create_license { or die "No license specified"; my $key = $self->valid_licenses->{$l} - or die "'$l' isn't a license key we know about"; + or die "'$l' isn't a recognized license\n", + "licenses we know about:\n", + map { "\t$_\n" } sort keys %{ $self->valid_licenses }; + my $class = "Software::License::$key"; eval "use $class; 1"
Thank you for the patch. I'm not doing any active work on M::B at the moment, but as soon as someone is, I'm sure this patch will get applied. It's a nice bit of help for authors. -- David
Patch applied to repo as commit c8a277bb07946c6ca2ca3a8c2a6ec037f38b4b0f. Thank you!
Now that there has been a stable Module::Build release, I'm marking this "patched" issue as "resolved".