diff options
| author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2014-02-09 21:33:57 +0000 |
|---|---|---|
| committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2014-02-09 21:33:57 +0000 |
| commit | 3a3ee363aabfd679b63d9486cf6aa053f4825457 (patch) | |
| tree | 5c091620596db049c9bb0c9a6a027851fb611c6c /cpan/Module-Build/lib/Module/Build/Base.pm | |
| parent | 5ce19fcf9b06ef678cf66fa882e5b9296294b8e0 (diff) | |
| download | perl-3a3ee363aabfd679b63d9486cf6aa053f4825457.tar.gz | |
Update Module-Build to CPAN version 0.4205
[DELTA]
0.4205 - Sun Feb 9 17:51:22 CET 2014
[BUG FIXES]
- FIX license code regression for artistic license [Roy Ivy III, Leon Timmermans]
- Don't swallow ExtUtils::CBuilder loading errors [Matthew Horsfall, Leon Timmermans]
- Handle testing on cross-compile builds [Brian Fraser]
- Protect against platforms without getpw{nam,uid} [Brian Fraser]
Diffstat (limited to 'cpan/Module-Build/lib/Module/Build/Base.pm')
| -rw-r--r-- | cpan/Module-Build/lib/Module/Build/Base.pm | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/cpan/Module-Build/lib/Module/Build/Base.pm b/cpan/Module-Build/lib/Module/Build/Base.pm index 758a8813fd..84e137fb4f 100644 --- a/cpan/Module-Build/lib/Module/Build/Base.pm +++ b/cpan/Module-Build/lib/Module/Build/Base.pm @@ -6,7 +6,7 @@ use strict; use vars qw($VERSION); use warnings; -$VERSION = '0.4204'; +$VERSION = '0.4205'; $VERSION = eval $VERSION; BEGIN { require 5.006001 } @@ -4388,8 +4388,8 @@ BEGIN { *scripts = \&script_files; } perl => 'Perl_5', apache => 'Apache_2_0', apache_1_1 => 'Apache_1_1', - artistic => 'Artistic_1_0', - artistic_2 => 'Artistic_2_0', + artistic => 'Artistic_1', + artistic_2 => 'Artistic_2', lgpl => 'LGPL_2_1', lgpl2 => 'LGPL_2_1', lgpl3 => 'LGPL_3_0', @@ -4435,21 +4435,30 @@ BEGIN { *scripts = \&script_files; } } } -# use mapping or license name directly -sub _software_license_object { - my ($self) = @_; - return unless defined( my $license = $self->license ); - - my $class; +sub _software_license_class { + my ($self, $license) = @_; + if ($self->valid_licenses->{$license} && eval { require Software::LicenseUtils; Software::LicenseUtils->VERSION(0.103009) }) { + my ($class) = Software::LicenseUtils->guess_license_from_meta_key($license, 1); + eval "require $class"; + #die $class; + return $class; + } LICENSE: for my $l ( $self->valid_licenses->{ $license }, $license ) { next unless defined $l; my $trial = "Software::License::" . $l; if ( eval "require Software::License; Software::License->VERSION(0.014); require $trial; 1" ) { - $class = $trial; - last LICENSE; + return $trial; } } - return unless defined $class; + return; +} + +# use mapping or license name directly +sub _software_license_object { + my ($self) = @_; + return unless defined( my $license = $self->license ); + + my $class = $self->_software_license_class($license) or return; # Software::License requires a 'holder' argument my $author = join( " & ", @{ $self->dist_author }) || 'unknown'; @@ -5339,7 +5348,7 @@ sub have_c_compiler { return $p->{_have_c_compiler} if defined $p->{_have_c_compiler}; $self->log_verbose("Checking if compiler tools configured... "); - my $b = eval { $self->cbuilder }; + my $b = $self->cbuilder; my $have = $b && eval { $b->have_compiler }; $self->log_verbose($have ? "ok.\n" : "failed.\n"); return $p->{_have_c_compiler} = $have; |
