Commit e91aece1 authored by gregor herrmann's avatar gregor herrmann

Refresh patches.

parent 0e6308ac
Description: add or_later license parameter
--- a/lib/Software/License.pm
+++ b/lib/Software/License.pm
@@ -75,9 +75,11 @@
@@ -160,9 +160,11 @@
Carp::confess "couldn't build $which section" unless
my $template = $self->section_data($which);
......@@ -16,7 +16,7 @@ Description: add or_later license parameter
}
--- a/lib/Software/LicenseUtils.pm
+++ b/lib/Software/LicenseUtils.pm
@@ -137,6 +137,13 @@
@@ -183,6 +183,13 @@
'Artistic' => 'Software::License::Artistic_1_0',
'Artistic-1' => 'Software::License::Artistic_1_0',
'Artistic-2' => 'Software::License::Artistic_2_0',
......@@ -29,8 +29,8 @@ Description: add or_later license parameter
+ 'LGPL-3.0+' => [ 'Software::License::LGPL_3_0', or_later => 1 ],
);
@@ -149,10 +156,12 @@
# =method new_from_short_name
@@ -207,10 +214,12 @@
Carp::croak "Unknow license with short name $short"
unless $short_name{$short};
......@@ -66,9 +66,9 @@ Description: add or_later license parameter
+
+}
+{
+my $license = $class->new_from_short_name({
+ short_name => 'LGPL-2+',
+ holder => 'X. Ample'
+my $license = $class->new_from_short_name({
+ short_name => 'LGPL-2+',
+ holder => 'X. Ample'
+});
+
+is($license->holder, 'X. Ample', '(c) holder');
......
Description: added summary
--- a/lib/Software/License/Artistic_1_0.pm
+++ b/lib/Software/License/Artistic_1_0.pm
@@ -75,6 +75,12 @@
@@ -97,6 +97,12 @@
=cut
__DATA__
......
......@@ -4,12 +4,16 @@ Description: ensure backward compatibility
This patch should be dropped once the reverse deps are adapted to the new API.
--- a/lib/Software/License.pm
+++ b/lib/Software/License.pm
@@ -11,10 +11,17 @@
@@ -8,6 +8,8 @@
use Sub::Install ();
use Text::Template ();
+use Software::LicenseUtils;
+
# =head1 SYNOPSIS
#
# my $license = Software::License::Discordian->new({
@@ -31,6 +33,12 @@
sub new {
my ($class, $arg) = @_;
......@@ -40,9 +44,9 @@ Description: ensure backward compatibility
+
+# test backward compat form
+{
+my $license = Software::License->new({
+ short_name => 'LGPL-2+',
+ holder => 'X. Ample'
+my $license = Software::License->new({
+ short_name => 'LGPL-2+',
+ holder => 'X. Ample'
+});
+
+is($license->holder, 'X. Ample', '(c) holder');
......
Description: new method
--- a/lib/Software/License.pm
+++ b/lib/Software/License.pm
@@ -27,6 +27,11 @@
@@ -68,6 +68,21 @@
sub notice { shift->_fill_in('NOTICE') }
+# =method summary
+#
+# This method returns a summary of the license. This summary must
+# refer to a file containing the whole license. On Debian system, the file
+# containing the whole license will be in C</usr/share/common-licenses/>
+# directory.
+#
+# =cut
+
+sub summary {
+ my ($self,$distro) = @_;
+ $distro ||= 'debian' ;
+ $self->_fill_in(uc($distro).'-SUMMARY');
+}
sub license { shift->_fill_in('LICENSE') }
@@ -163,6 +168,13 @@
C<meta_name> returns open_source, restricted, unrestricted, or unknown, that
value will be used.
+=head2 summary
+
+This method returns a summary of the license. This summary must contains
+refer to a file containing the whole license. On Debian system, the file
+containing the whole license will be in C</usr/share/common-licenses/>
+directory.
+
=head1 LOOKING UP LICENSE CLASSES
If you have an entry in a F<META.yml> or F<META.json> file, or similar
# =method license
#
# This method returns the full text of the license.
......@@ -14,9 +14,9 @@ Description: new test for summary feature
+require_ok($class);
+
+{
+my $license = $class->new_from_short_name({
+ short_name => 'LGPL-2',
+ holder => 'X. Ample'
+my $license = $class->new_from_short_name({
+ short_name => 'LGPL-2',
+ holder => 'X. Ample'
+});
+
+is($license->holder, 'X. Ample', '(c) holder');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment