Perl-Toolchain-Gang / Software-License

perl representation of common software licenses
18 stars 40 forks source link

guess_license_from_pod() now knows about Software::License::CC0_1_0 #47

Closed neilb closed 3 years ago

neilb commented 8 years ago

CPANTS was saying that I didn't have a known license in one of AUDREYT's dists that I released.

Turns out it was because guess_license_from_pod() didn't know about Software::License::CC0_1_0.

With this PR it does know about it, and my release is now clean \o/, but you should look at @phrases and see whether you like the way I added it.

I added a test based on the license text from DateTime::Functions, the dist in question.

karenetheridge commented 8 years ago

I didn't think we added licences here that are handled by external distributions -- e.g. there are a number of other Creative Commons licences distributed separately that are also not listed here.

If you have Software::License::CC0_1_0 installed, things "should" work. Probably CPANTS should install all the Software::License::* distributions to be able to report this metric properly. (I'd also add this module to the 'develop' prereqs in metadata.)

neilb commented 8 years ago

I didn't entirely understand your comment @karenetheridge, but addressing some of the points:

I didn't think we added licences here that are handled by external distributions

Software::License::CC0_1_0 is part of the Software-License distribution. I didn't check every other license, but guess_license_from_pod() looks to be able to recognise the other licenses that are part of the distribution.

But that gives me an idea related to the the code at line 63 of Software::LicenseUtils, which aggregates information from whatever Software::License::* modules it finds. In addition to the metadata that it adds in from each module, maybe each module could optionally provide phrase patterns, like those I added in directly?

neilb commented 8 years ago

Ah, so in the first comment when I said:

Turns out it was because guess_license_from_pod() didn't know about Software::License::CC0_1_0.

I should have said:

guess_license_from_pod() doesn't know how to recognise the snippet text, the way it does for other licenses, because @phrases (on line 25 of Software::LicenseUtils) doesn't have entry entries for matching the snippet text for CC0_1_0.

karenetheridge commented 8 years ago

Software::License::CC0_1_0 is part of the Software-License distribution

Ah, then I was totally out to lunch.. I understand now!

charsbar commented 8 years ago

+1 but it might be better just to add more explicit "Works under CC0" (or even "CC0") instead of those two rather long and obscure phrases ("has dedicated the work to the Commons", "waiving all of his or her rights to the work worldwide under copyright law").

neilb commented 8 years ago

@charsbar agreed, adding some shorter identifying string to the snippet would help.

That said, those phrases are the key things about the license :-)

rjbs commented 8 years ago

I vote yes.

neilb commented 8 years ago

I vote yes :-)

karenetheridge commented 8 years ago

okay, I vote yes!

rjbs commented 3 years ago

This was merged in e68ba86 in 2017