Commit fcdda23b authored by Dominique Dumont's avatar Dominique Dumont

Imported Upstream version 0.103010

parent b8eb912f
Revision history for Software-License
0.103010 2014-03-29 22:13:19-04:00 America/New_York
- fix guess_license_from_pod's return on GPL licenses
(thanks, Syohei YOSHIDA!)
0.103009 2014-02-20 22:19:45-05:00 America/New_York
- Updated FSF mailing address in license text for GFDL versions 1.2,
GPL versions 1 & 2, and LGPL 2.1
......
......@@ -22,7 +22,7 @@ This is free software, licensed under:
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......
......@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 5.014, CPAN::Meta::Converter version 2.133380",
"generated_by" : "Dist::Zilla version 5.014, CPAN::Meta::Converter version 2.140640",
"license" : [
"perl_5"
],
......@@ -59,10 +59,10 @@
"web" : "https://github.com/rjbs/Software-License"
}
},
"version" : "0.103009",
"version" : "0.103010",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.019009"
"version" : "5.019010"
},
"plugins" : [
{
......@@ -73,12 +73,12 @@
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@RJBS/CheckPrereqsIndexed",
"version" : "0.010"
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::CheckExtraTests",
"name" : "@RJBS/CheckExtraTests",
"version" : "0.018"
"version" : "0.021"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
......@@ -94,7 +94,7 @@
}
},
"name" : "@RJBS/RJBS-Outdated",
"version" : "0.017"
"version" : "0.021"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
......@@ -108,7 +108,7 @@
}
},
"name" : "@RJBS/CPAN-Outdated",
"version" : "0.017"
"version" : "0.021"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
......@@ -145,11 +145,6 @@
"name" : "@RJBS/@Filter/ShareDir",
"version" : "5.014"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Filter/MakeMaker",
"version" : "5.014"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Filter/Manifest",
......@@ -170,6 +165,16 @@
"name" : "@RJBS/@Filter/UploadToCPAN",
"version" : "5.014"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 9
}
},
"name" : "@RJBS/MakeMaker",
"version" : "5.014"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
......
......@@ -8,7 +8,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: '6.30'
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.014, CPAN::Meta::Converter version 2.133380'
generated_by: 'Dist::Zilla version 5.014, CPAN::Meta::Converter version 2.140640'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -30,10 +30,10 @@ resources:
bugtracker: https://github.com/rjbs/Software-License/issues
homepage: https://github.com/rjbs/Software-License
repository: https://github.com/rjbs/Software-License.git
version: '0.103009'
version: '0.103010'
x_Dist_Zilla:
perl:
version: '5.019009'
version: '5.019010'
plugins:
-
class: Dist::Zilla::Plugin::Git::GatherDir
......@@ -42,11 +42,11 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@RJBS/CheckPrereqsIndexed'
version: '0.010'
version: '0.011'
-
class: Dist::Zilla::Plugin::CheckExtraTests
name: '@RJBS/CheckExtraTests'
version: '0.018'
version: '0.021'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
......@@ -58,7 +58,7 @@ x_Dist_Zilla:
phase: build
skip: []
name: '@RJBS/RJBS-Outdated'
version: '0.017'
version: '0.021'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
......@@ -69,7 +69,7 @@ x_Dist_Zilla:
phase: release
skip: []
name: '@RJBS/CPAN-Outdated'
version: '0.017'
version: '0.021'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Filter/PruneCruft'
......@@ -98,10 +98,6 @@ x_Dist_Zilla:
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Filter/ShareDir'
version: '5.014'
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Filter/MakeMaker'
version: '5.014'
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Filter/Manifest'
......@@ -118,6 +114,13 @@ x_Dist_Zilla:
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Filter/UploadToCPAN'
version: '5.014'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 9
name: '@RJBS/MakeMaker'
version: '5.014'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
......
......@@ -36,7 +36,7 @@ my %WriteMakefileArgs = (
"Test::More" => "0.96",
"Try::Tiny" => 0
},
"VERSION" => "0.103009",
"VERSION" => "0.103010",
"test" => {
"TESTS" => "t/*.t"
}
......
This archive contains the distribution Software-License,
version 0.103009:
version 0.103010:
packages that provide templated software licenses
......
......@@ -3,30 +3,30 @@ use warnings;
use 5.006; # warnings
package Software::License;
# ABSTRACT: packages that provide templated software licenses
$Software::License::VERSION = '0.103009';
$Software::License::VERSION = '0.103010';
use Data::Section -setup => { header_re => qr/\A__([^_]+)__\Z/ };
use Sub::Install ();
use Text::Template ();
# =head1 SYNOPSIS
#
# my $license = Software::License::Discordian->new({
# holder => 'Ricardo Signes',
# });
#
# print $output_fh $license->fulltext;
#
# =method new
#
# my $license = $subclass->new(\%arg);
#
# This method returns a new license object for the given license class. Valid
# arguments are:
#
# holder - the holder of the copyright; required
# year - the year of copyright; defaults to current year
#
# =cut
#pod =head1 SYNOPSIS
#pod
#pod my $license = Software::License::Discordian->new({
#pod holder => 'Ricardo Signes',
#pod });
#pod
#pod print $output_fh $license->fulltext;
#pod
#pod =method new
#pod
#pod my $license = $subclass->new(\%arg);
#pod
#pod This method returns a new license object for the given license class. Valid
#pod arguments are:
#pod
#pod holder - the holder of the copyright; required
#pod year - the year of copyright; defaults to current year
#pod
#pod =cut
sub new {
my ($class, $arg) = @_;
......@@ -36,64 +36,64 @@ sub new {
bless $arg => $class;
}
# =method year
#
# =method holder
#
# These methods are attribute readers.
#
# =cut
#pod =method year
#pod
#pod =method holder
#pod
#pod These methods are attribute readers.
#pod
#pod =cut
sub year { defined $_[0]->{year} ? $_[0]->{year} : (localtime)[5]+1900 }
sub holder { $_[0]->{holder} }
# =method name
#
# This method returns the name of the license, suitable for shoving in the middle
# of a sentence, generally with a leading capitalized "The."
#
# =method url
#
# This method returns the URL at which a canonical text of the license can be
# found, if one is available. If possible, this will point at plain text, but it
# may point to an HTML resource.
#
# =method notice
#
# This method returns a snippet of text, usually a few lines, indicating the
# copyright holder and year of copyright, as well as an indication of the license
# under which the software is distributed.
#
# =cut
#pod =method name
#pod
#pod This method returns the name of the license, suitable for shoving in the middle
#pod of a sentence, generally with a leading capitalized "The."
#pod
#pod =method url
#pod
#pod This method returns the URL at which a canonical text of the license can be
#pod found, if one is available. If possible, this will point at plain text, but it
#pod may point to an HTML resource.
#pod
#pod =method notice
#pod
#pod This method returns a snippet of text, usually a few lines, indicating the
#pod copyright holder and year of copyright, as well as an indication of the license
#pod under which the software is distributed.
#pod
#pod =cut
sub notice { shift->_fill_in('NOTICE') }
# =method license
#
# This method returns the full text of the license.
#
# =cut
#pod =method license
#pod
#pod This method returns the full text of the license.
#pod
#pod =cut
sub license { shift->_fill_in('LICENSE') }
# =method fulltext
#
# This method returns the complete text of the license, preceded by the copyright
# notice.
#
# =cut
#pod =method fulltext
#pod
#pod This method returns the complete text of the license, preceded by the copyright
#pod notice.
#pod
#pod =cut
sub fulltext {
my ($self) = @_;
return join "\n", $self->notice, $self->license;
}
# =method version
#
# This method returns the version of the license. If the license is not
# versioned, this method will return false.
#
# =cut
#pod =method version
#pod
#pod This method returns the version of the license. If the license is not
#pod versioned, this method will return false.
#pod
#pod =cut
sub version {
my ($self) = @_;
......@@ -105,23 +105,23 @@ sub version {
return join '.', @vparts;
}
# =method meta_name
#
# This method returns the string that should be used for this license in the CPAN
# META.yml file, according to the CPAN Meta spec v1, or undef if there is no
# known string to use.
#
# This method may also be invoked as C<meta_yml_name> for legacy reasons.
#
# =method meta2_name
#
# This method returns the string that should be used for this license in the CPAN
# META.json or META.yml file, according to the CPAN Meta spec v2, or undef if
# there is no known string to use. If this method does not exist, and
# C<meta_name> returns open_source, restricted, unrestricted, or unknown, that
# value will be used.
#
# =cut
#pod =method meta_name
#pod
#pod This method returns the string that should be used for this license in the CPAN
#pod META.yml file, according to the CPAN Meta spec v1, or undef if there is no
#pod known string to use.
#pod
#pod This method may also be invoked as C<meta_yml_name> for legacy reasons.
#pod
#pod =method meta2_name
#pod
#pod This method returns the string that should be used for this license in the CPAN
#pod META.json or META.yml file, according to the CPAN Meta spec v2, or undef if
#pod there is no known string to use. If this method does not exist, and
#pod C<meta_name> returns open_source, restricted, unrestricted, or unknown, that
#pod value will be used.
#pod
#pod =cut
# sub meta1_name { return undef; } # sort this out later, should be easy
sub meta_name { return undef; }
......@@ -152,49 +152,49 @@ sub _fill_in {
);
}
# =head1 LOOKING UP LICENSE CLASSES
#
# If you have an entry in a F<META.yml> or F<META.json> file, or similar
# metadata, and want to look up the Software::License class to use, there are
# useful tools in L<Software::LicenseUtils>.
#
# =head1 TODO
#
# =for :list
# * register licenses with aliases to allow $registry->get('gpl', 2);
#
# =head1 SEE ALSO
#
# The specific license:
#
# =for :list
# * L<Software::License::AGPL_3>
# * L<Software::License::Apache_1_1>
# * L<Software::License::Apache_2_0>
# * L<Software::License::Artistic_1_0>
# * L<Software::License::Artistic_2_0>
# * L<Software::License::BSD>
# * L<Software::License::CC0>
# * L<Software::License::FreeBSD>
# * L<Software::License::GFDL_1_2>
# * L<Software::License::GPL_1>
# * L<Software::License::GPL_2>
# * L<Software::License::GPL_3>
# * L<Software::License::LGPL_2_1>
# * L<Software::License::LGPL_3_0>
# * L<Software::License::MIT>
# * L<Software::License::Mozilla_1_0>
# * L<Software::License::Mozilla_1_1>
# * L<Software::License::Mozilla_2_0>
# * L<Software::License::None>
# * L<Software::License::OpenSSL>
# * L<Software::License::Perl_5>
# * L<Software::License::QPL_1_0>
# * L<Software::License::SSLeay>
# * L<Software::License::Sun>
# * L<Software::License::Zlib>
#
# =cut
#pod =head1 LOOKING UP LICENSE CLASSES
#pod
#pod If you have an entry in a F<META.yml> or F<META.json> file, or similar
#pod metadata, and want to look up the Software::License class to use, there are
#pod useful tools in L<Software::LicenseUtils>.
#pod
#pod =head1 TODO
#pod
#pod =for :list
#pod * register licenses with aliases to allow $registry->get('gpl', 2);
#pod
#pod =head1 SEE ALSO
#pod
#pod The specific license:
#pod
#pod =for :list
#pod * L<Software::License::AGPL_3>
#pod * L<Software::License::Apache_1_1>
#pod * L<Software::License::Apache_2_0>
#pod * L<Software::License::Artistic_1_0>
#pod * L<Software::License::Artistic_2_0>
#pod * L<Software::License::BSD>
#pod * L<Software::License::CC0>
#pod * L<Software::License::FreeBSD>
#pod * L<Software::License::GFDL_1_2>
#pod * L<Software::License::GPL_1>
#pod * L<Software::License::GPL_2>
#pod * L<Software::License::GPL_3>
#pod * L<Software::License::LGPL_2_1>
#pod * L<Software::License::LGPL_3_0>
#pod * L<Software::License::MIT>
#pod * L<Software::License::Mozilla_1_0>
#pod * L<Software::License::Mozilla_1_1>
#pod * L<Software::License::Mozilla_2_0>
#pod * L<Software::License::None>
#pod * L<Software::License::OpenSSL>
#pod * L<Software::License::Perl_5>
#pod * L<Software::License::QPL_1_0>
#pod * L<Software::License::SSLeay>
#pod * L<Software::License::Sun>
#pod * L<Software::License::Zlib>
#pod
#pod =cut
1;
......@@ -208,7 +208,7 @@ Software::License - packages that provide templated software licenses
=head1 VERSION
version 0.103009
version 0.103010
=head1 SYNOPSIS
......
use strict;
use warnings;
package Software::License::AGPL_3;
$Software::License::AGPL_3::VERSION = '0.103009';
$Software::License::AGPL_3::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: GNU Affero General Public License, Version 3
......@@ -23,7 +23,7 @@ Software::License::AGPL_3 - GNU Affero General Public License, Version 3
=head1 VERSION
version 0.103009
version 0.103010
=head1 AUTHOR
......
use strict;
use warnings;
package Software::License::Apache_1_1;
$Software::License::Apache_1_1::VERSION = '0.103009';
$Software::License::Apache_1_1::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: The Apache Software License, Version 1.1
......@@ -22,7 +22,7 @@ Software::License::Apache_1_1 - The Apache Software License, Version 1.1
=head1 VERSION
version 0.103009
version 0.103010
=head1 AUTHOR
......
use strict;
use warnings;
package Software::License::Apache_2_0;
$Software::License::Apache_2_0::VERSION = '0.103009';
$Software::License::Apache_2_0::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: The Apache License, Version 2.0
......@@ -22,7 +22,7 @@ Software::License::Apache_2_0 - The Apache License, Version 2.0
=head1 VERSION
version 0.103009
version 0.103010
=head1 AUTHOR
......
use strict;
use warnings;
package Software::License::Artistic_1_0;
$Software::License::Artistic_1_0::VERSION = '0.103009';
$Software::License::Artistic_1_0::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: The Artistic License
# =head1 OPTIONS
#
# The Artistic License 1.0 has a sometimes-omitted "aggregation clause" which
# reads:
#
# 8. The name of the Copyright Holder may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# By default, this clause will be included. To disable it, include the following
# pair when instantiating the license:
#
# aggregation_clause => 0
#
# =head1 METHODS
#
# =head2 aggregation_clause
#
# This method returns whether the aggregation clause is allowed on this instance.
# By default this method returns true on instances and dies on the class.
#
# =cut
#pod =head1 OPTIONS
#pod
#pod The Artistic License 1.0 has a sometimes-omitted "aggregation clause" which
#pod reads:
#pod
#pod 8. The name of the Copyright Holder may not be used to endorse or promote
#pod products derived from this software without specific prior written
#pod permission.
#pod
#pod By default, this clause will be included. To disable it, include the following
#pod pair when instantiating the license:
#pod
#pod aggregation_clause => 0
#pod
#pod =head1 METHODS
#pod
#pod =head2 aggregation_clause
#pod
#pod This method returns whether the aggregation clause is allowed on this instance.
#pod By default this method returns true on instances and dies on the class.
#pod
#pod =cut
sub aggregation_clause {
exists $_[0]->{aggregation_clause} ? $_[0]->{aggregation_clause} : 1
......@@ -60,7 +60,7 @@ Software::License::Artistic_1_0 - The Artistic License
=head1 VERSION
version 0.103009
version 0.103010
=head1 OPTIONS
......
use strict;
use warnings;
package Software::License::Artistic_2_0;
$Software::License::Artistic_2_0::VERSION = '0.103009';
$Software::License::Artistic_2_0::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: The Artistic License 2.0
......@@ -22,7 +22,7 @@ Software::License::Artistic_2_0 - The Artistic License 2.0
=head1 VERSION
version 0.103009
version 0.103010
=head1 AUTHOR
......
use strict;
use warnings;
package Software::License::BSD;
$Software::License::BSD::VERSION = '0.103009';
$Software::License::BSD::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: The (three-clause) BSD License
......@@ -22,7 +22,7 @@ Software::License::BSD - The (three-clause) BSD License
=head1 VERSION
version 0.103009
version 0.103010
=head1 AUTHOR
......
use strict;
use warnings;
package Software::License::CC0_1_0;
$Software::License::CC0_1_0::VERSION = '0.103009';
$Software::License::CC0_1_0::VERSION = '0.103010';
use parent 'Software::License';
# ABSTRACT: the "public domain"-like CC0 license, version 1.0
# =head1 WARNING
#
# B<You should really think hard before using this license.>
#
# This license is provided for those who want to place their software into the
# public domain. Doing this means you have waived any copyright protection as
# much as allowed by law, and that you grant anybody the right to do anything
# with your software. You cannot reverse your decision to dedicate software as
# public property, so use this only if you're quite sure that you mean to do
# it.
#
# =cut
#pod =head1 WARNING
#pod
#pod B<You should really think hard before using this license.>
#pod
#pod This license is provided for those who want to place their software into the
#pod public domain. Doing this means you have waived any copyright protection as
#pod much as allowed by law, and that you grant anybody the right to do anything
#pod with your software. You cannot reverse your decision to dedicate software as
#pod public property, so use this only if you're quite sure that you mean to do
#pod it.
#pod
#pod =cut
sub name { q(CC0 License) }
sub url { q{http://creativecommons.org/publicdomain/zero/1.0/} }
......@@ -36,7 +36,7 @@ Software::License::CC0_1_0 - the "public domain"-like CC0 license, version 1.0
=head1 VERSION
version 0.103009
version 0.103010
=head1 WARNING
......
......@@ -2,79 +2,79 @@ use strict;
use warnings;
package Software::License::Custom;
# ABSTRACT: custom license handler
$Software::License::Custom::VERSION = '0.103009';
$Software::License::Custom::VERSION = '0.103010';
use parent 'Software::License';
use Carp;
use Text::Template;
# =head1 DESCRIPTION
#
# This module extends L<Software::License> to give the possibility of specifying
# all aspects related to a software license in a custom file. This allows for
# setting custom dates, notices, etc. while still preserving compatibility with
# all places where L<Software::License> is used, e.g. L<Dist::Zilla>.
#
# In this way, you should be able to customise some aspects of the licensing
# messages that would otherwise be difficult to tinker, e.g. adding a note
# in the notice, setting multiple years for the copyright notice or set multiple
# authors and/or copyright holders.
#
# The license details should be put inside a file that contains different
# sections. Each section has the following format:
#
# =begin :list
#
# = header line
#
# This is a line that begins and ends with two underscores C<__>. The string
# between the begin and the end of the line is first depured of any non-word
# character, then used as the name of the section;
#
# = body
#
# a L<Text::Template> (possibly a plain text file) where items to be
# expanded are enclosed between double braces
#
# =end :list
#
# Each section is terminated by the header of the following section or by
# the end of the file. Example:
#
# __[ NAME ]__
# The Foo-Bar License
# __URL__
# http://www.example.com/foo-bar.txt
# __[ META_NAME ]__
# foo_bar_meta
# __{ META2_NAME }__
# foo_bar_meta2
# __[ NOTICE ]__
# Copyright (C) 2000-2002 by P.R. Evious
# Copyright (C) {{$self->year}} by {{$self->holder}}.
#
# This is free software, licensed under {{$self->name}}.
#
# __[ LICENSE ]__