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

Owner: Nobody in particular
Requestors: yanick+cpan [...]

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

Subject: list recognized licenses if given an unknown one
Download (untitled) / with headers
text/plain 193b
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:
Subject: license.diff
Download license.diff
text/x-diff 564b
diff --git a/lib/Module/Build/ b/lib/Module/Build/ index 7e28e1e..57c4490 100644 --- a/lib/Module/Build/ +++ b/lib/Module/Build/ @@ -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"
Download (untitled) / with headers
text/plain 191b
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!
Download (untitled) / with headers
text/plain 103b
Now that there has been a stable Module::Build release, I'm marking this "patched" issue as "resolved".

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

Please report any issues with to