"perl5-porters@perl.org"
],
"dynamic_config" : 1,
- "generated_by" : "CPAN::Meta version 2.132830",
+ "generated_by" : "CPAN::Meta version 2.133380",
"license" : [
"perl_5"
],
- perl5-porters@perl.org
build_requires: {}
dynamic_config: 1
-generated_by: 'CPAN::Meta version 2.132830, CPAN::Meta::Converter version 2.132830'
+generated_by: 'CPAN::Meta version 2.133380, CPAN::Meta::Converter version 2.133380'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
# Note: When updating CPAN-Meta the META.* files will need to be regenerated
# perl -Icpan/CPAN-Meta/lib Porting/makemeta
'CPAN::Meta' => {
- 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-2.132830.tar.gz',
+ 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-2.133380.tar.gz',
'FILES' => q[cpan/CPAN-Meta],
'EXCLUDED' => [
qw(t/00-compile.t),
use strict;
use warnings;
package CPAN::Meta;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
use Carp qw(carp croak);
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 SYNOPSIS
use strict;
use warnings;
package CPAN::Meta::Converter;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
use CPAN::Meta::Validator;
use CPAN::Meta::Requirements;
use version 0.88 ();
use Parse::CPAN::Meta 1.4400 ();
+use List::Util 1.33 qw/all/;
sub _dclone {
my $ref = shift;
};
}
-my @valid_licenses_1 = (
+my @open_source = (
'perl',
'gpl',
'apache',
'mit',
'mozilla',
'open_source',
+);
+
+my %is_open_source = map {; $_ => 1 } @open_source;
+
+my @valid_licenses_1 = (
+ @open_source,
'unrestricted',
'restrictive',
'unknown',
if ( $license_map_1{lc $element} ) {
return $license_map_1{lc $element};
}
- return 'unknown';
+ else {
+ return 'unknown';
+ }
}
my @valid_licenses_2 = qw(
return "unknown";
}
elsif( ref $element eq 'ARRAY' ) {
- if ( @$element == 1 ) {
- return $license_downgrade_map{$element->[0]} || "unknown";
+ if ( @$element > 1) {
+ if ( all { $is_open_source{ $license_downgrade_map{lc $_} || 'unknown' } } @$element ) {
+ return 'open_source';
+ }
+ else {
+ return 'unknown';
+ }
+ }
+ elsif ( @$element == 1 ) {
+ return $license_downgrade_map{lc $element->[0]} || "unknown";
}
}
elsif ( ! ref $element ) {
- return $license_downgrade_map{$element} || "unknown";
+ return $license_downgrade_map{lc $element} || "unknown";
}
return "unknown";
}
# XXX turn this into CPAN::Meta::Requirements with bad version hook
# and then turn it back into a hash
my $new_map = CPAN::Meta::Requirements->new(
- { bad_version_hook => sub { version->new(0) } } # punt
+ { bad_version_hook => \&_bad_version_hook } # punt
);
while ( my ($k,$v) = each %$element ) {
next unless _is_module_name($k);
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 SYNOPSIS
use strict;
use warnings;
package CPAN::Meta::Feature;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
use CPAN::Meta::Prereqs;
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 DESCRIPTION
use strict;
use warnings;
package CPAN::Meta::History;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
1;
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 DESCRIPTION
use strict;
use warnings;
package CPAN::Meta::Prereqs;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
use Carp qw(confess);
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 DESCRIPTION
use strict;
use warnings;
package CPAN::Meta::Spec;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
1;
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 SYNOPSIS
license => [ 'perl_5' ]
- license => [ 'apache_2', 'mozilla_1_0' ]
+ license => [ 'apache_2_0', 'mozilla_1_0' ]
(Spec 2) [required] {List of one or more License Strings}
use strict;
use warnings;
package CPAN::Meta::Validator;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
#--------------------------------------------------------------------------#
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
=head1 VERSION
-version 2.132830
+version 2.133380
=head1 SYNOPSIS
}
}
+# specific test for multiple licenses
+{
+ my $path = File::Spec->catfile('t','data-test','META-2.json');
+ my $original = Parse::CPAN::Meta->load_file( $path );
+ ok( $original, "loaded META-2.json" );
+ my $cmc = CPAN::Meta::Converter->new( $original );
+ my $cleaned_up = $cmc->convert( version => "2" );
+ is_deeply(
+ $cleaned_up->{license},
+ [ 'perl_5', 'bsd' ],
+ "multiple license preserved (v2)"
+ );
+
+ $cleaned_up = $cmc->convert( version => "1.4" );
+ is(
+ $cleaned_up->{license},
+ 'open_source',
+ "multiple license converted to open_source (v1.4)"
+ );
+}
+
done_testing;
],
"release_status" : "stable",
"license" : [
- "perl_5"
+ "perl_5",
+ "bsd"
],
"description" : "Module::Build is a system for building, testing, and installing Perl modules. It is meant to be an alternative to ExtUtils::MakeMaker... blah blah blah",
"keywords" : [