Hello community,
here is the log from the commit of package perl-Module-Starter for
openSUSE:Factory checked in at 2019-03-20 13:18:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-Starter (Old)
and /work/SRC/openSUSE:Factory/.perl-Module-Starter.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-Starter"
Wed Mar 20 13:18:41 2019 rev:15 rq:684910 version:1.76
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Module-Starter/perl-Module-Starter.changes
2018-06-29 22:23:23.706619231 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Module-Starter.new.28833/perl-Module-Starter.changes
2019-03-20 13:18:45.389351638 +0100
@@ -1,0 +2,6 @@
+Wed Mar 13 16:18:33 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 1.76
+ see /usr/share/doc/packages/perl-Module-Starter/Changes
+
+-------------------------------------------------------------------
Old:
----
Module-Starter-1.75.tar.gz
New:
----
Module-Starter-1.76.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Module-Starter.spec ++++++
--- /var/tmp/diff_new_pack.kOsbHh/_old 2019-03-20 13:18:46.461351378 +0100
+++ /var/tmp/diff_new_pack.kOsbHh/_new 2019-03-20 13:18:46.461351378 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Module-Starter
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-Module-Starter
-Version: 1.75
+Version: 1.76
Release: 0
%define cpan_name Module-Starter
-Summary: Simple Starter Kit for Any Module
+Summary: Simple starter kit for any module
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/Module-Starter/
+Url: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/D/DB/DBOOK/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
@@ -31,9 +31,11 @@
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Module::Runtime)
+BuildRequires: perl(Software::License) >= 0.103005
BuildRequires: perl(parent)
BuildRequires: perl(version) >= 0.77
Requires: perl(Module::Runtime)
+Requires: perl(Software::License) >= 0.103005
Requires: perl(parent)
Requires: perl(version) >= 0.77
%{perl_requires}
@@ -51,11 +53,11 @@
%setup -q -n %{cpan_name}-%{version}
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
%check
-%{__make} test
+make test
%install
%perl_make_install
++++++ Module-Starter-1.75.tar.gz -> Module-Starter-1.76.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/Changes
new/Module-Starter-1.76/Changes
--- old/Module-Starter-1.75/Changes 2018-06-14 18:54:00.000000000 +0200
+++ new/Module-Starter-1.76/Changes 2019-03-11 19:49:22.000000000 +0100
@@ -1,5 +1,10 @@
Revision history for Perl extension Module::Starter
+1.76 Mon Mar 11 14:49:14 EDT 2019
+ * GH#68: Default module templates will now use test_requires where
appropriate (Dan Book)
+ * GH#70: License metadata and blurbs are now handled by
Software::License (Dan Book)
+ * GH#70: Add --genlicense option to generate LICENSE file (Dan Book)
+
1.75 Thu Jun 14 12:53:47 EDT 2018
* Update additional template URLs for consistency in tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/META.json
new/Module-Starter-1.76/META.json
--- old/Module-Starter-1.75/META.json 2018-06-14 18:55:15.000000000 +0200
+++ new/Module-Starter-1.76/META.json 2019-03-11 19:50:37.000000000 +0100
@@ -37,6 +37,7 @@
"Getopt::Long" : "0",
"Module::Runtime" : "0",
"Pod::Usage" : "1.21",
+ "Software::License" : "0.103005",
"Test::Harness" : "0.21",
"Test::More" : "0",
"parent" : "0",
@@ -58,6 +59,6 @@
},
"x_IRC" : "irc://irc.perl.org/#toolchain"
},
- "version" : "1.75",
- "x_serialization_backend" : "JSON::PP version 2.97001"
+ "version" : "1.76",
+ "x_serialization_backend" : "JSON::PP version 4.02"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/META.yml
new/Module-Starter-1.76/META.yml
--- old/Module-Starter-1.75/META.yml 2018-06-14 18:55:15.000000000 +0200
+++ new/Module-Starter-1.76/META.yml 2019-03-11 19:50:37.000000000 +0100
@@ -23,6 +23,7 @@
Getopt::Long: '0'
Module::Runtime: '0'
Pod::Usage: '1.21'
+ Software::License: '0.103005'
Test::Harness: '0.21'
Test::More: '0'
parent: '0'
@@ -33,5 +34,5 @@
bugtracker: https://github.com/xsawyerx/module-starter/issues
homepage: https://github.com/xsawyerx/module-starter
repository: https://github.com/xsawyerx/module-starter.git
-version: '1.75'
+version: '1.76'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/Makefile.PL
new/Module-Starter-1.76/Makefile.PL
--- old/Module-Starter-1.75/Makefile.PL 2017-08-11 01:44:52.000000000 +0200
+++ new/Module-Starter-1.76/Makefile.PL 2019-03-11 19:42:19.000000000 +0100
@@ -21,6 +21,7 @@
'Module::Runtime' => '0',
'Pod::Usage' => '1.21',
'parent' => '0',
+ 'Software::License' => '0.103005',
'version' => '0.77',
},
(! eval { ExtUtils::MakeMaker->VERSION('6.46') } ? () :
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/bin/module-starter
new/Module-Starter-1.76/bin/module-starter
--- old/Module-Starter-1.75/bin/module-starter 2017-03-23 02:54:43.000000000
+0100
+++ new/Module-Starter-1.76/bin/module-starter 2019-03-11 19:42:19.000000000
+0100
@@ -26,7 +26,7 @@
--builder=module Build with 'ExtUtils::MakeMaker' or 'Module::Build'
--eumm Same as --builder=ExtUtils::MakeMaker
--mb Same as --builder=Module::Build
- --mi Same as --builder=Module::Install
+ --mi Same as --builder=Module::Install (discouraged)
--author=name Author's name (taken from getpwuid if not provided)
--email=email Author's email (taken from EMAIL if not provided)
@@ -34,6 +34,7 @@
--ignores=type Ignore type files to include (repeatable)
--license=type License under which the module will be distributed
(default is artistic2)
+ --genlicense Generate LICENSE file according to specified license
--minperl=ver Minimum Perl version required (optional;
default is 5.006)
@@ -49,7 +50,10 @@
perl, artistic, artistic2, mit, mozilla, mozilla2, bsd, freebsd, cc0,
gpl, lgpl, gpl3, lgpl3, agpl3, apache, qpl
-
+
+You may also specify any Software::License subclass or CPAN::Meta::Spec license
+string.
+
Available Ignore Types:
cvs, git, hg, manifest, generic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/getting-started.html
new/Module-Starter-1.76/getting-started.html
--- old/Module-Starter-1.75/getting-started.html 2017-03-23
02:54:43.000000000 +0100
+++ new/Module-Starter-1.76/getting-started.html 2018-07-17
18:17:44.000000000 +0200
@@ -190,7 +190,7 @@
has dependencies. You'll want to consult your build
system documentation for what options you can uses. For
<code>Module::Install</code> this documentation can be found at
- <a
href="http://search.cpan.org/perldoc?Module::Install">http://search.cpan.org/perldoc</a>.
+ <a
href="https://metacpan.org/pod/Module::Install">https://metacpan.org</a>.
</p>
</dd>
@@ -240,15 +240,15 @@
<p>
If you're new to testing in Perl, then you should
start by reading the <code>Test::Tutorial</code> at
- <a
href="http://search.cpan.org/perldoc?Test::Tutorial">http://search.cpan.org/perldoc</a>.
+ <a
href="https://metacpan.org/pod/Test::Tutorial">https://metacpan.org</a>.
</p>
</dd>
<dd>
<p>
At Perl Training Australia, we usually add a test based on
- <code>Test::Perl::Critic</code> <a
href="http://search.cpan.org/perldoc?Test::Perl::Critic">http://search.cpan.org/perldoc</a>
+ <code>Test::Perl::Critic</code> <a
href="https://metacpan.org/pod/Test::Perl::Critic">https://metacpan.org</a>
to encourage good coding practices, and <code>Test::Kwalitee</code>
- <a
href="http://search.cpan.org/perldoc?Test::Kwalittee">http://search.cpan.org/perldoc</a>
to catch common
+ <a
href="https://metacpan.org/pod/Test::Kwalittee">https://metacpan.org</a> to
catch common
mistakes that are made in distributions.
</p>
</dd>
@@ -258,7 +258,7 @@
the better. If you already have a test suite and you're wondering
which parts of your code are not being tested, you can use the
excellent <code>Devel::Cover</code> tool from
- <a
href="http://search.cpan.org/perldoc?Devel::Cover">http://search.cpan.org/perldoc</a>.
+ <a
href="https://metacpan.org/pod/Devel::Cover">https://metacpan.org</a>.
</p>
</dd>
</dl>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/lib/Module/Starter/App.pm
new/Module-Starter-1.76/lib/Module/Starter/App.pm
--- old/Module-Starter-1.75/lib/Module/Starter/App.pm 2018-06-14
18:53:05.000000000 +0200
+++ new/Module-Starter-1.76/lib/Module/Starter/App.pm 2019-03-11
19:48:14.000000000 +0100
@@ -9,7 +9,7 @@
use warnings;
use strict;
-our $VERSION = '1.75';
+our $VERSION = '1.76';
use File::Spec;
use Getopt::Long;
@@ -82,6 +82,7 @@
'author=s' => \$config{author},
'email=s' => \$config{email},
'license=s' => \$config{license},
+ genlicense => \$config{genlicense},
'minperl=s' => \$config{minperl},
'fatalize' => \$config{fatalize},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/lib/Module/Starter/BuilderSet.pm
new/Module-Starter-1.76/lib/Module/Starter/BuilderSet.pm
--- old/Module-Starter-1.75/lib/Module/Starter/BuilderSet.pm 2018-06-14
18:53:30.000000000 +0200
+++ new/Module-Starter-1.76/lib/Module/Starter/BuilderSet.pm 2019-03-11
19:48:36.000000000 +0100
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 1.75
+Version 1.76
=cut
-our $VERSION = '1.75';
+our $VERSION = '1.76';
=head1 SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Starter-1.75/lib/Module/Starter/Plugin/Template.pm
new/Module-Starter-1.76/lib/Module/Starter/Plugin/Template.pm
--- old/Module-Starter-1.75/lib/Module/Starter/Plugin/Template.pm
2018-06-14 18:53:39.000000000 +0200
+++ new/Module-Starter-1.76/lib/Module/Starter/Plugin/Template.pm
2019-03-11 19:48:53.000000000 +0100
@@ -10,11 +10,11 @@
=head1 VERSION
-Version 1.75
+Version 1.76
=cut
-our $VERSION = '1.75';
+our $VERSION = '1.76';
=head1 SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/lib/Module/Starter/Simple.pm
new/Module-Starter-1.76/lib/Module/Starter/Simple.pm
--- old/Module-Starter-1.75/lib/Module/Starter/Simple.pm 2018-06-14
18:53:24.000000000 +0200
+++ new/Module-Starter-1.76/lib/Module/Starter/Simple.pm 2019-03-11
19:48:44.000000000 +0100
@@ -8,6 +8,7 @@
use ExtUtils::Command qw( rm_rf mkpath touch );
use File::Spec ();
use Carp qw( carp confess croak );
+use Module::Runtime qw( require_module );
use Module::Starter::BuilderSet;
@@ -17,11 +18,11 @@
=head1 VERSION
-Version 1.75
+Version 1.76
=cut
-our $VERSION = '1.75';
+our $VERSION = '1.76';
=head1 SYNOPSIS
@@ -131,6 +132,7 @@
push @files, $self->create_Changes;
push @files, $self->create_README( $build_results{instructions} );
+ push @files, $self->create_LICENSE if $self->{genlicense};
$self->create_MANIFEST( $build_results{'manifest_method'} ) unless (
$self->{manifest_skip} );
# TODO: put files to ignore in a more standard form?
@@ -226,391 +228,54 @@
=cut
our $LICENSES = {
- perl => {
- license => 'perl',
- slname => 'perl_5',
- url => 'http://dev.perl.org/licenses/',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify it
-under the terms of either: the GNU General Public License as published
-by the Free Software Foundation; or the Artistic License.
-
-See L<http://dev.perl.org/licenses/> for more information.
-EOT
- },
- artistic => {
- license => 'artistic',
- slname => 'artistic_1',
- url => 'http://www.perlfoundation.org/artistic_license_1_0',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify it
-under the terms of the the Artistic License (1.0). You may obtain a
-copy of the full license at:
-
-L<http://www.perlfoundation.org/artistic_license_1_0>
-
-Aggregation of this Package with a commercial distribution is always
-permitted provided that the use of this Package is embedded; that is,
-when no overt attempt is made to make this Package's interfaces visible
-to the end user of the commercial distribution. Such use shall not be
-construed as a distribution of this Package.
-
-The name of the Copyright Holder may not be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-EOT
- },
- artistic2 => {
- license => 'artistic2',
- slname => 'artistic_2',
- url => 'http://www.perlfoundation.org/artistic_license_2_0',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify it
-under the terms of the the Artistic License (2.0). You may obtain a
-copy of the full license at:
-
-L<http://www.perlfoundation.org/artistic_license_2_0>
-
-Any use, modification, and distribution of the Standard or Modified
-Versions is governed by this Artistic License. By using, modifying or
-distributing the Package, you accept this license. Do not use, modify,
-or distribute the Package, if you do not accept this license.
-
-If your Modified Version has been derived from a Modified Version made
-by someone other than you, you are nevertheless required to ensure that
-your Modified Version complies with the requirements of this license.
-
-This license does not grant you the right to use any trademark, service
-mark, tradename, or logo of the Copyright Holder.
-
-This license includes the non-exclusive, worldwide, free-of-charge
-patent license to make, have made, use, offer to sell, sell, import and
-otherwise transfer the Package with respect to any patent claims
-licensable by the Copyright Holder that are necessarily infringed by the
-Package. If you institute patent litigation (including a cross-claim or
-counterclaim) against any party alleging that the Package constitutes
-direct or contributory patent infringement, then this Artistic License
-to you shall terminate on the date that such litigation is filed.
-
-Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
-AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
-THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
-YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
-CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-EOT
- },
- mit => {
- license => 'mit',
- slname => 'mit',
- url => 'http://www.opensource.org/licenses/mit-license.php',
- blurb => <<'EOT',
-This program is distributed under the MIT (X11) License:
-L<http://www.opensource.org/licenses/mit-license.php>
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-EOT
- },
- mozilla => {
- license => 'mozilla',
- slname => 'mozilla_1_1',
- url => 'http://www.mozilla.org/MPL/1.1/',
- blurb => <<'EOT',
-The contents of this file are subject to the Mozilla Public License
-Version 1.1 (the "License"); you may not use this file except in
-compliance with the License. You may obtain a copy of the License at
-L<http://www.mozilla.org/MPL/>
-
-Software distributed under the License is distributed on an "AS IS"
-basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-License for the specific language governing rights and limitations
-under the License.
-EOT
- },
- mozilla2 => {
- license => 'mozilla2',
- slname => 'open_source',
- url => 'http://www.mozilla.org/MPL/2.0/',
- blurb => <<'EOT',
-This Source Code Form is subject to the terms of the Mozilla Public
-License, v. 2.0. If a copy of the MPL was not distributed with this
-file, You can obtain one at L<http://mozilla.org/MPL/2.0/>.
-EOT
- },
- bsd => {
- license => 'bsd',
- slname => 'bsd',
- url => 'http://www.opensource.org/licenses/BSD-3-Clause',
- blurb => <<"EOT",
-This program is distributed under the (Revised) BSD License:
-L<http://www.opensource.org/licenses/BSD-3-Clause>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-* Neither the name of ___AUTHOR___'s Organization
-nor the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-EOT
- },
- freebsd => {
- license => 'freebsd',
- slname => 'freebsd',
- url => 'http://www.opensource.org/licenses/BSD-2-Clause',
- blurb => <<"EOT",
-This program is distributed under the (Simplified) BSD License:
-L<http://www.opensource.org/licenses/BSD-2-Clause>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-EOT
- },
- cc0 => {
- license => 'cc0',
- slname => 'unrestricted',
- url => 'http://creativecommons.org/publicdomain/zero/1.0/',
- blurb => <<'EOT',
-This program is distributed under the CC0 1.0 Universal License:
-L<http://creativecommons.org/publicdomain/zero/1.0/>
-
-The person who associated a work with this deed has dedicated the work
-to the public domain by waiving all of his or her rights to the work
-worldwide under copyright law, including all related and neighboring
-rights, to the extent allowed by law.
-
-You can copy, modify, distribute and perform the work, even for
-commercial purposes, all without asking permission. See Other
-Information below.
-
-Other Information:
-
-* In no way are the patent or trademark rights of any person affected
-by CC0, nor are the rights that other persons may have in the work or
-in how the work is used, such as publicity or privacy rights.
-
-* Unless expressly stated otherwise, the person who associated a work
-with this deed makes no warranties about the work, and disclaims
-liability for all uses of the work, to the fullest extent permitted
-by applicable law.
-
-* When using or citing the work, you should not imply endorsement by
-the author or the affirmer.
-EOT
- },
- gpl => {
- license => 'gpl',
- slname => 'gpl_2',
- url => 'http://www.gnu.org/licenses/gpl-2.0.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; version 2 dated June, 1991 or at your option
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-A copy of the GNU General Public License is available in the source tree;
-if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-EOT
- },
- lgpl => {
- license => 'lgpl',
- slname => 'lgpl_2_1',
- url => 'http://www.gnu.org/licenses/lgpl-2.1.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this program; if not, write to the Free
-Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-EOT
- },
- gpl3 => {
- license => 'gpl3',
- slname => 'gpl_3',
- url => 'http://www.gnu.org/licenses/gpl-3.0.html',
- blurb => <<'EOT',
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see L<http://www.gnu.org/licenses/>.
-EOT
- },
- lgpl3 => {
- license => 'lgpl3',
- slname => 'lgpl_3_0',
- url => 'http://www.gnu.org/licenses/lgpl-3.0.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this program. If not, see
-L<http://www.gnu.org/licenses/>.
-EOT
- },
- agpl3 => {
- license => 'agpl3',
- slname => 'agpl_3',
- url => 'http://www.gnu.org/licenses/agpl-3.0.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU Affero General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public
-License along with this program. If not, see
-L<http://www.gnu.org/licenses/>.
-EOT
- },
- apache => {
- license => 'apache',
- slname => 'apache_2_0',
- url => 'http://www.apache.org/licenses/LICENSE-2.0',
- blurb => <<'EOT',
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- L<http://www.apache.org/licenses/LICENSE-2.0>
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-EOT
- },
- qpl => {
- license => 'qpl',
- slname => 'qpl_1_0',
- url => 'http://www.opensource.org/licenses/QPL-1.0',
- blurb => <<'EOT',
-This program is distributed under the Q Public License (QPL-1.0):
-L<http://www.opensource.org/licenses/QPL-1.0>
-
-The Software and this license document are provided AS IS with NO
-WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE.
-EOT
- },
-
-
+ perl => 'Perl_5',
+ artistic => 'Artistic_1_0',
+ artistic2 => 'Artistic_2_0',
+ mozilla => 'Mozilla_1_1',
+ mozilla2 => 'Mozilla_2_0',
+ bsd => 'BSD',
+ freebsd => 'FreeBSD',
+ cc0 => 'CC0_1_0',
+ gpl => 'GPL_2',
+ lgpl => 'LGPL_2_1',
+ gpl3 => 'GPL_3',
+ lgpl3 => 'LGPL_3_0',
+ agpl3 => 'AGPL_3',
+ apache => 'Apache_2_0',
+ qpl => 'QPL_1_0',
};
-sub _license_record { $LICENSES->{ shift->{license} }; }
+sub _license_record {
+ my $self = shift;
+ my $key = $LICENSES->{ $self->{license} };
+ $key = $self->{license} unless defined $key;
+ my $class = $key =~ m/::/ ? $key : "Software::License::$key";
+ {
+ local $@;
+ undef $class unless eval { require_module $class; 1 } and
$class->can('new');
+ }
+ unless (defined $class) {
+ require Software::LicenseUtils;
+ ($class) = Software::LicenseUtils->guess_license_from_meta_key($key);
+ return undef unless defined $class;
+ }
+ return $class->new( { holder => $self->{author} } );
+}
sub _license_blurb {
my $self = shift;
my $record = $self->{license_record};
my $license_blurb = defined($record) ?
- $record->{blurb} :
+ $record->notice :
<<"EOT";
-This program is released under the following license: $self->{license}
+This software is Copyright (c) @{[ $self->_thisyear ]} by $self->{author}.
+
+This program is released under the following license:
+
+ $self->{license}
EOT
- $license_blurb =~ s/___AUTHOR___/$self->{author}/ge;
chomp $license_blurb;
return $license_blurb;
}
@@ -751,7 +416,7 @@
(my $author = "$self->{author} <$self->{email}>") =~ s/'/\'/g;
- my $slname = $self->{license_record} ? $self->{license_record}->{slname} :
$self->{license};
+ my $slname = $self->{license_record} ? $self->{license_record}->meta2_name
: $self->{license};
my $warnings = sprintf 'warnings%s;', ($self->{fatalize} ? " FATAL =>
'all'" : '');
@@ -761,18 +426,17 @@
use $warnings
use ExtUtils::MakeMaker;
-WriteMakefile(
+my %WriteMakefileArgs = (
NAME => '$main_module',
AUTHOR => q{$author},
VERSION_FROM => '$main_pm_file',
ABSTRACT_FROM => '$main_pm_file',
LICENSE => '$slname',
- PL_FILES => {},
MIN_PERL_VERSION => '$self->{minperl}',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '0',
},
- BUILD_REQUIRES => {
+ TEST_REQUIRES => {
'Test::More' => '0',
},
PREREQ_PM => {
@@ -782,6 +446,26 @@
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => '$self->{distro}-*' },
);
+
+# Compatibility with old versions of ExtUtils::MakeMaker
+unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
+ my \$test_requires = delete \$WriteMakefileArgs{TEST_REQUIRES} || {};
+ \@{\$WriteMakefileArgs{PREREQ_PM}}{keys %\$test_requires} = values
%\$test_requires;
+}
+
+unless (eval { ExtUtils::MakeMaker->VERSION('6.55_03'); 1 }) {
+ my \$build_requires = delete \$WriteMakefileArgs{BUILD_REQUIRES} || {};
+ \@{\$WriteMakefileArgs{PREREQ_PM}}{keys %\$build_requires} = values
%\$build_requires;
+}
+
+delete \$WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 };
+delete \$WriteMakefileArgs{MIN_PERL_VERSION}
+ unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 };
+delete \$WriteMakefileArgs{LICENSE}
+ unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 };
+
+WriteMakefile(%WriteMakefileArgs);
HERE
}
@@ -802,7 +486,7 @@
my $author = "$self->{author} <$self->{email}>";
$author =~ s/'/\'/g;
- my $license_url = $self->{license_record} ? $self->{license_record}->{url}
: '';
+ my $license_url = $self->{license_record} ? $self->{license_record}->url :
'';
my $warnings = sprintf 'warnings%s;', ($self->{fatalize} ? " FATAL =>
'all'" : '');
@@ -834,7 +518,7 @@
'Module::Install' => '0',
);
-build_requires (
+test_requires (
'Test::More' => '0',
);
@@ -893,7 +577,7 @@
(my $author = "$self->{author} <$self->{email}>") =~ s/'/\'/g;
- my $slname = $self->{license_record} ? $self->{license_record}->{slname} :
$self->{license};
+ my $slname = $self->{license_record} ? $self->{license_record}->meta2_name
: $self->{license};
my $warnings = sprintf 'warnings%s;', ($self->{fatalize} ? " FATAL =>
'all'" : '');
@@ -902,6 +586,7 @@
use strict;
use $warnings
use Module::Build;
+Module::Build->VERSION('0.4004');
my \$builder = Module::Build->new(
module_name => '$main_module',
@@ -910,9 +595,9 @@
dist_version_from => '$main_pm_file',
release_status => 'stable',
configure_requires => {
- 'Module::Build' => '0',
+ 'Module::Build' => '0.4004',
},
- build_requires => {
+ test_requires => {
'Test::More' => '0',
},
requires => {
@@ -961,6 +646,23 @@
HERE
}
+=head2 create_LICENSE
+
+This method creates the distribution's LICENSE file.
+
+=cut
+
+sub create_LICENSE {
+ my $self = shift;
+
+ my $record = $self->{license_record} || return ();
+ my $fname = File::Spec->catfile( $self->{basedir}, 'LICENSE' );
+ $self->create_file( $fname, $record->license );
+ $self->progress( "Created $fname" );
+
+ return 'LICENSE';
+}
+
=head2 create_README( $build_instructions )
This method creates the distribution's README file.
@@ -1026,14 +728,11 @@
sub _README_license {
my $self = shift;
- my $year = $self->_thisyear();
my $license_blurb = $self->_license_blurb();
return <<"HERE";
LICENSE AND COPYRIGHT
-Copyright (C) $year $self->{author}
-
$license_blurb
HERE
}
@@ -1519,7 +1218,7 @@
# (also, manifest supports REs.)
manifest => <<'EOF',
# Top-level filter (only include the following...)
-^(?!(?:script|examples|lib|inc|t|xt|maint)/|(?:(?:Makefile|Build)\.PL|README|MANIFEST|Changes|META\.(?:yml|json))$)
+^(?!(?:script|examples|lib|inc|t|xt|maint)/|(?:(?:Makefile|Build)\.PL|README|LICENSE|MANIFEST|Changes|META\.(?:yml|json))$)
# Avoid version control files.
\bRCS\b
@@ -1755,13 +1454,10 @@
my $rtname = shift;
my $license_blurb = $self->_license_blurb();
- my $year = $self->_thisyear();
my $content = qq[
\=head1 LICENSE AND COPYRIGHT
-Copyright $year $self->{author}.
-
$license_blurb
];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/lib/Module/Starter.pm
new/Module-Starter-1.76/lib/Module/Starter.pm
--- old/Module-Starter-1.75/lib/Module/Starter.pm 2018-06-14
18:53:14.000000000 +0200
+++ new/Module-Starter-1.76/lib/Module/Starter.pm 2019-03-11
19:48:28.000000000 +0100
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 1.75
+Version 1.76
=cut
-our $VERSION = '1.75';
+our $VERSION = '1.76';
=head1 SYNOPSIS
@@ -146,7 +146,7 @@
L<https://github.com/xsawyerx/module-starter/issues>
-=item * Metacpan
+=item * Search CPAN
L<https://metacpan.org/release/Module-Starter>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/t/data/templates/Module.pm
new/Module-Starter-1.76/t/data/templates/Module.pm
--- old/Module-Starter-1.75/t/data/templates/Module.pm 2017-03-23
02:54:43.000000000 +0100
+++ new/Module-Starter-1.76/t/data/templates/Module.pm 2018-07-17
18:20:06.000000000 +0200
@@ -84,7 +84,7 @@
=item * Search CPAN
-L<http://search.cpan.org/dist/Foo-Bar>
+L<https://metacpan.org/release/Foo-Bar>
=back
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/t/data/templates/README
new/Module-Starter-1.76/t/data/templates/README
--- old/Module-Starter-1.75/t/data/templates/README 2017-03-23
02:54:43.000000000 +0100
+++ new/Module-Starter-1.76/t/data/templates/README 2018-07-17
18:19:49.000000000 +0200
@@ -37,7 +37,7 @@
http://cpanratings.perl.org/d/Foo-Bar
Search CPAN
- http://search.cpan.org/dist/Foo-Bar
+ https://metacpan.org/release/Foo-Bar
COPYRIGHT AND LICENCE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Starter-1.75/t/test-dist.t
new/Module-Starter-1.76/t/test-dist.t
--- old/Module-Starter-1.75/t/test-dist.t 2018-06-13 00:19:37.000000000
+0200
+++ new/Module-Starter-1.76/t/test-dist.t 2019-03-11 19:42:19.000000000
+0100
@@ -16,6 +16,7 @@
use Test::More;
use File::Basename;
+use Module::Runtime qw( require_module );
sub new {
my $class = shift;
@@ -107,376 +108,21 @@
# purposes of testing.
our $LICENSES = {
- perl => {
- license => 'perl',
- slname => 'perl_5',
- url => 'http://dev.perl.org/licenses/',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify it
-under the terms of either: the GNU General Public License as published
-by the Free Software Foundation; or the Artistic License.
-
-See L<http://dev.perl.org/licenses/> for more information.
-EOT
- },
- artistic => {
- license => 'artistic',
- slname => 'artistic_1',
- url => 'http://www.perlfoundation.org/artistic_license_1_0',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify it
-under the terms of the the Artistic License (1.0). You may obtain a
-copy of the full license at:
-
-L<http://www.perlfoundation.org/artistic_license_1_0>
-
-Aggregation of this Package with a commercial distribution is always
-permitted provided that the use of this Package is embedded; that is,
-when no overt attempt is made to make this Package's interfaces visible
-to the end user of the commercial distribution. Such use shall not be
-construed as a distribution of this Package.
-
-The name of the Copyright Holder may not be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-EOT
- },
- artistic2 => {
- license => 'artistic2',
- slname => 'artistic_2',
- url => 'http://www.perlfoundation.org/artistic_license_2_0',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify it
-under the terms of the the Artistic License (2.0). You may obtain a
-copy of the full license at:
-
-L<http://www.perlfoundation.org/artistic_license_2_0>
-
-Any use, modification, and distribution of the Standard or Modified
-Versions is governed by this Artistic License. By using, modifying or
-distributing the Package, you accept this license. Do not use, modify,
-or distribute the Package, if you do not accept this license.
-
-If your Modified Version has been derived from a Modified Version made
-by someone other than you, you are nevertheless required to ensure that
-your Modified Version complies with the requirements of this license.
-
-This license does not grant you the right to use any trademark, service
-mark, tradename, or logo of the Copyright Holder.
-
-This license includes the non-exclusive, worldwide, free-of-charge
-patent license to make, have made, use, offer to sell, sell, import and
-otherwise transfer the Package with respect to any patent claims
-licensable by the Copyright Holder that are necessarily infringed by the
-Package. If you institute patent litigation (including a cross-claim or
-counterclaim) against any party alleging that the Package constitutes
-direct or contributory patent infringement, then this Artistic License
-to you shall terminate on the date that such litigation is filed.
-
-Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
-AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
-THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
-YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
-CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-EOT
- },
- mit => {
- license => 'mit',
- slname => 'mit',
- url => 'http://www.opensource.org/licenses/mit-license.php',
- blurb => <<'EOT',
-This program is distributed under the MIT (X11) License:
-L<http://www.opensource.org/licenses/mit-license.php>
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-EOT
- },
- mozilla => {
- license => 'mozilla',
- slname => 'mozilla_1_1',
- url => 'http://www.mozilla.org/MPL/1.1/',
- blurb => <<'EOT',
-The contents of this file are subject to the Mozilla Public License
-Version 1.1 (the "License"); you may not use this file except in
-compliance with the License. You may obtain a copy of the License at
-L<http://www.mozilla.org/MPL/>
-
-Software distributed under the License is distributed on an "AS IS"
-basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-License for the specific language governing rights and limitations
-under the License.
-EOT
- },
- mozilla2 => {
- license => 'mozilla2',
- slname => 'open_source',
- url => 'http://www.mozilla.org/MPL/2.0/',
- blurb => <<'EOT',
-This Source Code Form is subject to the terms of the Mozilla Public
-License, v. 2.0. If a copy of the MPL was not distributed with this
-file, You can obtain one at L<http://mozilla.org/MPL/2.0/>.
-EOT
- },
- bsd => {
- license => 'bsd',
- slname => 'bsd',
- url => 'http://www.opensource.org/licenses/BSD-3-Clause',
- blurb => <<"EOT",
-This program is distributed under the (Revised) BSD License:
-L<http://www.opensource.org/licenses/BSD-3-Clause>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-* Neither the name of ___AUTHOR___'s Organization
-nor the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-EOT
- },
- freebsd => {
- license => 'freebsd',
- slname => 'freebsd',
- url => 'http://www.opensource.org/licenses/BSD-2-Clause',
- blurb => <<"EOT",
-This program is distributed under the (Simplified) BSD License:
-L<http://www.opensource.org/licenses/BSD-2-Clause>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-EOT
- },
- cc0 => {
- license => 'cc0',
- slname => 'unrestricted',
- url => 'http://creativecommons.org/publicdomain/zero/1.0/',
- blurb => <<'EOT',
-This program is distributed under the CC0 1.0 Universal License:
-L<http://creativecommons.org/publicdomain/zero/1.0/>
-
-The person who associated a work with this deed has dedicated the work
-to the public domain by waiving all of his or her rights to the work
-worldwide under copyright law, including all related and neighboring
-rights, to the extent allowed by law.
-
-You can copy, modify, distribute and perform the work, even for
-commercial purposes, all without asking permission. See Other
-Information below.
-
-Other Information:
-
-* In no way are the patent or trademark rights of any person affected
-by CC0, nor are the rights that other persons may have in the work or
-in how the work is used, such as publicity or privacy rights.
-
-* Unless expressly stated otherwise, the person who associated a work
-with this deed makes no warranties about the work, and disclaims
-liability for all uses of the work, to the fullest extent permitted
-by applicable law.
-
-* When using or citing the work, you should not imply endorsement by
-the author or the affirmer.
-EOT
- },
- gpl => {
- license => 'gpl',
- slname => 'gpl_2',
- url => 'http://www.gnu.org/licenses/gpl-2.0.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; version 2 dated June, 1991 or at your option
-any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-A copy of the GNU General Public License is available in the source tree;
-if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-EOT
- },
- lgpl => {
- license => 'lgpl',
- slname => 'lgpl_2_1',
- url => 'http://www.gnu.org/licenses/lgpl-2.1.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this program; if not, write to the Free
-Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-EOT
- },
- gpl3 => {
- license => 'gpl3',
- slname => 'gpl_3',
- url => 'http://www.gnu.org/licenses/gpl-3.0.html',
- blurb => <<'EOT',
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see L<http://www.gnu.org/licenses/>.
-EOT
- },
- lgpl3 => {
- license => 'lgpl3',
- slname => 'lgpl_3_0',
- url => 'http://www.gnu.org/licenses/lgpl-3.0.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this program. If not, see
-L<http://www.gnu.org/licenses/>.
-EOT
- },
- agpl3 => {
- license => 'agpl3',
- slname => 'agpl_3',
- url => 'http://www.gnu.org/licenses/agpl-3.0.html',
- blurb => <<'EOT',
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU Affero General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public
-License along with this program. If not, see
-L<http://www.gnu.org/licenses/>.
-EOT
- },
- apache => {
- license => 'apache',
- slname => 'apache_2_0',
- url => 'http://www.apache.org/licenses/LICENSE-2.0',
- blurb => <<'EOT',
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- L<http://www.apache.org/licenses/LICENSE-2.0>
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-EOT
- },
- qpl => {
- license => 'qpl',
- slname => 'qpl_1_0',
- url => 'http://www.opensource.org/licenses/QPL-1.0',
- blurb => <<'EOT',
-This program is distributed under the Q Public License (QPL-1.0):
-L<http://www.opensource.org/licenses/QPL-1.0>
-
-The Software and this license document are provided AS IS with NO
-WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE.
-EOT
- },
-
-
+ perl => 'Perl_5',
+ artistic => 'Artistic_1_0',
+ artistic2 => 'Artistic_2_0',
+ mozilla => 'Mozilla_1_1',
+ mozilla2 => 'Mozilla_2_0',
+ bsd => 'BSD',
+ freebsd => 'FreeBSD',
+ cc0 => 'CC0_1_0',
+ gpl => 'GPL_2',
+ lgpl => 'LGPL_2_1',
+ gpl3 => 'GPL_3',
+ lgpl3 => 'LGPL_3_0',
+ agpl3 => 'AGPL_3',
+ apache => 'Apache_2_0',
+ qpl => 'QPL_1_0',
};
=head2 $file_parser->parse_paras(\@paras, $message)
@@ -545,8 +191,12 @@
my $mainmod = $self->{modules}[0];
my $minperl = $self->{minperl} || '5.006';
- my $slname = $LICENSES->{ $self->{license} }->{slname};
- my $license_url = $LICENSES->{ $self->{license} }->{url};
+ my $license_class = "Software::License::$LICENSES->{ $self->{license} }";
+ require_module $license_class;
+ my $license = $license_class->new({ holder => $self->{author} });
+ my $slname = $license->meta2_name;
+ my $license_url = $license->url;
+ my $license_text = $license->license;
(my $authoremail = "$self->{author} <$self->{email}>") =~ s/'/\'/g;
(my $libmod = "lib/$mainmod".'.pm') =~ s|::|/|g;
@@ -560,7 +210,7 @@
}
my $msw_re = qr{use \Q$minperl;\E\n\Quse strict;\E\n\Quse warnings;\E\n};
- my $mswb_re = $self->{builder} eq 'Module::Install' ? qr{\A$msw_re\Quse
inc::$self->{builder};\E\n\n} : qr{\A$msw_re\Quse $self->{builder};\E\n\n};
+ my $mswb_re = $self->{builder} eq 'Module::Install' ? qr{\A$msw_re\Quse
inc::$self->{builder};\E\n\n} : qr{\A$msw_re\Quse $self->{builder};\E\n};
my $mswt_re = qr{\A\Q#!perl -T\E\n$msw_re\Quse Test::More;\E\n\n};
if ($basefn eq 'README') {
@@ -594,6 +244,11 @@
"RT"
);
}
+ elsif ($basefn eq 'LICENSE') {
+ plan tests => 2;
+ $self->consume($license_text, 'license text');
+ $self->is_end();
+ }
elsif ($basefn eq 'Build.PL' && $self->{builder} eq 'Module::Build') {
plan tests => 10;
$self->parse($mswb_re,
@@ -621,13 +276,13 @@
);
$self->parse(
- qr/\A\s*configure_requires => \{\n *\Q'$self->{builder}' =>
'0'\E,\n\s*\},\n/ms,
+ qr/\A\s*configure_requires => \{\n *\Q'$self->{builder}' =>
'0.4004'\E,\n\s*\},\n/ms,
"Configure Requires",
);
$self->parse(
- qr/\A\s*build_requires => \{\n *\Q'Test::More' =>
'0'\E,\n\s*\},\n/ms,
- "Build Requires",
+ qr/\A\s*test_requires => \{\n *\Q'Test::More' =>
'0'\E,\n\s*\},\n/ms,
+ "Test Requires",
);
$self->parse(
@@ -641,7 +296,7 @@
);
}
elsif ($basefn eq 'Makefile.PL' && $self->{builder} eq
'ExtUtils::MakeMaker') {
- plan tests => 11;
+ plan tests => 10;
$self->parse($mswb_re,
"Min/Strict/Warning/Builder"
);
@@ -666,10 +321,6 @@
"LICENSE",
);
- $self->parse(qr{\A\s*PL_FILES *=> *\{\},\n}ms,
- "PL_FILES",
- );
-
$self->parse(qr{\A\s*MIN_PERL_VERSION *=> *\Q'$minperl',\E\n}ms,
"MIN_PERL_VERSION",
);
@@ -680,8 +331,8 @@
);
$self->parse(
- qr/\A\s*BUILD_REQUIRES => \{\n *\Q'Test::More' =>
'0'\E,\n\s*\},\n/ms,
- "BUILD_REQUIRES",
+ qr/\A\s*TEST_REQUIRES => \{\n *\Q'Test::More' =>
'0'\E,\n\s*\},\n/ms,
+ "TEST_REQUIRES",
);
$self->parse(
@@ -737,8 +388,8 @@
);
$self->parse(
- qr/\A\s*build_requires \(\n *\Q'Test::More' => '0'\E,\n\s*\);\n/ms,
- "build_requires",
+ qr/\A\s*test_requires \(\n *\Q'Test::More' => '0'\E,\n\s*\);\n/ms,
+ "test_requires",
);
$self->parse(
@@ -774,6 +425,7 @@
('Build.PL') x!! ($self->{builder} eq 'Module::Build'),
'Changes',
( map { my $f = $_; $f =~ s|::|/|g; "lib/$f.pm"; }
@{$self->{modules}} ),
+ 'LICENSE',
('Makefile.PL') x!! ($self->{builder} ne 'Module::Build'),
"MANIFEST\t\t\tThis list of files",
qw(
@@ -791,7 +443,7 @@
plan tests => 2;
$self->consume(<<'EOF');
# Top-level filter (only include the following...)
-^(?!(?:script|examples|lib|inc|t|xt|maint)/|(?:(?:Makefile|Build)\.PL|README|MANIFEST|Changes|META\.(?:yml|json))$)
+^(?!(?:script|examples|lib|inc|t|xt|maint)/|(?:(?:Makefile|Build)\.PL|README|LICENSE|MANIFEST|Changes|META\.(?:yml|json))$)
# Avoid version control files.
\bRCS\b
@@ -1038,6 +690,8 @@
use parent qw(-norequire TestParseFile);
+use Module::Runtime qw( require_module );
+
sub parse_module_start {
my $self = shift;
@@ -1193,16 +847,13 @@
"acknowledgements",
);
- my $license_blurb = $LICENSES->{ $self->{license} }->{blurb};
- $license_blurb =~ s/___AUTHOR___/$author_name/ge;
+ my $license_class = "Software::License::$LICENSES->{ $self->{license} }";
+ require_module $license_class;
+ my $license = $license_class->new({ holder => $self->{author} });
+ my $license_blurb = $license->notice;
$self->parse_paras(
[
"=head1 LICENSE AND COPYRIGHT",
- { re =>
- q/Copyright \d+ /
- . quotemeta($author_name)
- . q/\./
- },
split(/\n\n+/, $license_blurb ),
],
"copyright",
@@ -1246,7 +897,7 @@
my $manifest_skip = $distro_var->{ignores_type} && !! grep {
/manifest/ } @{ $distro_var->{ignores_type} };
my @exist_files = (
- qw(README Changes),
+ qw(README LICENSE Changes),
$manifest_skip ? 'MANIFEST.SKIP' : 'MANIFEST',
$distro_var->{builder} eq 'Module::Build' ? 'Build.PL' :
'Makefile.PL',
[qw(t 00-load.t)],
@@ -1342,6 +993,7 @@
modules => ['MyModule::Test', 'MyModule::Test::App'],
builder => 'Module::Build',
license => 'artistic2',
+ genlicense => 1,
author => 'Baruch Spinoza',
email => '[email protected]',
verbose => 0,
@@ -1358,6 +1010,7 @@
],
builder => 'Module::Build',
license => 'artistic2',
+ genlicense => 1,
author => 'Jane Austen',
email => '[email protected]',
verbose => 0,
@@ -1427,6 +1080,7 @@
modules => \@modules,
builder => $builder,
license => $license,
+ genlicense => 1,
author => $author,
email => $email,
minperl => $minperl,