On Sep 14, 2006, at 4:36 AM, David Cantrell wrote:

Adam Kennedy wrote:

Agreed, while the META.yml key is the simplest way, it should be possible to locate the most common patterns for licensing, such at the typical COPYRIGHT POD block that often contains "... is licensed ..." etc.

Or licenced. Please remember to take account of such a common mis- spelling.

Again, I plug:
My Module::License::Report package looks for spelling errors like that. It does a weighted estimation of the license: meta.yml counts most, then DSLIP, then .pm POD, then .pod POD, and finally miscellaneous files like README, Build.PL, Makefile.PL.

Here's an example run:

% bin/license-report -a DateTime
Can't find a license for Class::Singleton
perl         DateTime
perl         DateTime-Locale
perl         DateTime-TimeZone
perl         Params-Validate

Of those five, DateTime-Locale and DateTime-TimeZone have META.yml license info and the others do not. Class::Singleton confuses my module by having an unusually stated license for Artistic only:

COPYRIGHT
    Copyright (C) 1998 Canon Research Centre Europe Ltd. All Rights
    Reserved.

    This module is free software; you can redistribute it and/or
    modify it under the term of the Perl Artistic License.

 ===

I'm plugging module this because I think it's an important tool that needs some improvement. Before this post did any of you know that the popular DateTime module had a non-Perl-licensed dependency? I didn't.

  https://svn.clotho.com/clotho/Module-License-Report/

Improvements needed:
 * Check if it works with a local CPAN mirrror
 * Reduce reliance on CPANPLUS?
* Better license heuristics (like detecting Artistic in the above example)
 * Test against more of CPAN
 * Better Build.PL/Makefile.PL parsing
   - PPI
   - Module::MakefilePL::Parse (but that uses eval)
- fancier regexps - http://www.nntp.perl.org/group/perl.makemaker/ 2523 * Better user control over weighting (like, a --yml flag to only look at META.yml)
 * Think harder about weighting:
- Certainty of heuristic should matter (META.yml is certain, regexps on POD prose is uncertain) - Partial success should matter (found a POD "COPYRIGHT" section, but couldn't parse it)
   - Locality to code should matter (POD more significant than DSLIP)
and finally:
* Advocacy to get popular modules to state their licenses more prominently * Advocacy to get modules with inconsistently stated licenses (e.g. DSLIP vs. POD) corrected

Chris

--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)


Reply via email to