Test::Copyright - Verify the consistency of license and copyright information
This document describes Test::Copyright version 0.0_1
use Test::More tests => 10; use Test::Copyright; copyright_ok()
Many CPAN authors are enthusiastic in their wish to contribute to the open source movement, but relatively unaware of the need for clear and consistent licensing and copyright information. This module attempts to check the quality of a module from the copyright and license perspectives. The following tests are applied:
This function does all the tests described above.
Cannot find dummy copyright: %s
Because Software::License places the copyright statement in its output, we need to extract it for our purposes. This error is raised if we fail to do so.
Test::Copyright requires no configuration files or environment variables and in fact at present is stubbornly resistant to any sort of configuration.
None reported.
This is not beta software. It is proof of concept software. It is being released at the earliest possible moment, because widespread adoption and feedback from the open source perl community is essential to its success.
The code does not yet allow for files with different copyright holders although that is planned for.
Other things that might reasonably be implemented have not been done.
Some code was used because it could be easily and quickly copied from other modules rather than because it is most appropriate.
There has been no test coverage analysis.
Some module quality test modules know how many tests they will actually run. This does not and you have to put that in yourself or take alternative steps.
A project such as this is inherently fragile, needing as it does to parse texts written for lawyers rather than well-intentioned computers. It would be a lot easier if all the perl software tools generated copyright and license texts intended for both categories of reader - and perhaps even humans as well.
Perhaps the copyright extraction part of the code could be more usefully in a separate module.
Please report any bugs or feature requests to bug-test-copyright@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-test-copyright@rt.cpan.org
I have to express my gratitude to (or possibly annoyance with) ingydotnet for provoking me into writing this module.
Nicholas Bamber <nicholas@periapt.co.uk>
<nicholas@periapt.co.uk>
Copyright (c) 2011, Nicholas Bamber <nicholas@periapt.co.uk>. All rights reserved.
Copyright (c) 2007-2008, Adam D. Barratt [one regular expression copied from licensecheck]
licensecheck
Copyright (c) 2006-2010, Andy Lester [a number of functions copied from Test::Pod]
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install Test::Copyright, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Copyright
CPAN shell
perl -MCPAN -e shell install Test::Copyright
For more information on module installation, please visit the detailed CPAN module installation guide.