X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fre-engine-Plugin.git;a=blobdiff_plain;f=inc%2FModule%2FInstall%2FMetadata.pm;h=b5658c9fdd983185f315c6f96af267345d322b12;hp=6c80832b6f3a2a90a301f971b7f78846592250ac;hb=447aa9bcb55632cf669454868679169602a28fe2;hpb=2dd7bc5f80da4fe2220e28de1102641c239d084c diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm index 6c80832..b5658c9 100644 --- a/inc/Module/Install/Metadata.pm +++ b/inc/Module/Install/Metadata.pm @@ -6,14 +6,14 @@ use Module::Install::Base; use vars qw{$VERSION $ISCORE @ISA}; BEGIN { - $VERSION = '0.64'; + $VERSION = '0.65'; $ISCORE = 1; @ISA = qw{Module::Install::Base}; } my @scalar_keys = qw{ name module_name abstract author version license - distribution_type perl_version tests + distribution_type perl_version tests installdirs }; my @tuple_keys = qw{ @@ -56,6 +56,11 @@ foreach my $key (@tuple_keys) { }; } +sub install_as_core { $_[0]->installdirs('perl') } +sub install_as_cpan { $_[0]->installdirs('site') } +sub install_as_site { $_[0]->installdirs('site') } +sub install_as_vendor { $_[0]->installdirs('vendor') } + sub sign { my $self = shift; return $self->{'values'}{'sign'} if defined wantarray and !@_; @@ -279,9 +284,11 @@ sub license_from { if ( $self->_slurp($file) =~ m/ - =head \d \s+ - (?:licen[cs]e|licensing|copyright|legal)\b - (.*?) + ( + =head \d \s+ + (?:licen[cs]e|licensing|copyright|legal)\b + .*? + ) (=head\\d.*|=cut.*|) \z /ixms @@ -298,6 +305,7 @@ sub license_from { 'LGPL' => 'lgpl', 'BSD' => 'bsd', 'Artistic' => 'artistic', + 'MIT' => 'MIT', ); while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) { $pattern =~ s{\s+}{\\s+}g;