From c10bfd5f494b88ffa6657f6243af072d087b713f Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Tue, 26 Feb 2008 01:03:34 +0000 Subject: [PATCH] Add META.yml and clean up Makefile.PL --- MANIFEST | 1 + META.yml | 16 ++++++++++++++++ Makefile.PL | 43 +++++++++++++++---------------------------- 3 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 META.yml diff --git a/MANIFEST b/MANIFEST index 7fad723..09d7a85 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,6 +1,7 @@ Changes Lowlevel changelog MANIFEST MANIFEST.SKIP +META.yml Makefile.PL OLE.xs README diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..643a703 --- /dev/null +++ b/META.yml @@ -0,0 +1,16 @@ +--- #YAML:1.0 +name: Win32-OLE +abstract: OLE Automation extensions +version: 0.1707 +author: + - Jan Dubois +license: perl +requires: + perl: 5.6 +resources: + license: http://dev.perl.org/licenses/ + homepage: http://code.google.com/p/libwin32/ +meta-spec: + version: 1.3 + url: http://module-build.sourceforge.net/META-spec-v1.3.html +generated_by: Jan Dubois diff --git a/Makefile.PL b/Makefile.PL index 6a749c1..70c2e63 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,7 @@ -use Config; +use strict; +use warnings; + +use Config qw(%Config); use ExtUtils::MakeMaker qw(&WriteMakefile &neatvalue); unless ($^O eq "MSWin32" || $^O eq "cygwin") { @@ -7,36 +10,20 @@ unless ($^O eq "MSWin32" || $^O eq "cygwin") { my $INSTDIR = grep(/INSTALLDIRS=perl/i, @ARGV) ? "lib" : "site\\lib"; -my @MM = +my %param = ( - 'NAME' => 'Win32::OLE', - 'VERSION_FROM' => 'lib/Win32/OLE.pm', - 'XS' => { 'OLE.xs' => 'OLE.cpp' }, - # Without the next line MakeMaker will not export the bootstrap function - # (because we are using FUNCLIST too). - 'DL_FUNCS' => { 'Win32::OLE' => [] }, - 'dist' => { COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, - 'clean' => { FILES => 'test.xls browser_to_blib' }, + NAME => 'Win32::OLE', + VERSION_FROM => 'lib/Win32/OLE.pm', + XS => { 'OLE.xs' => 'OLE.cpp' }, + # Without the next line MakeMaker will not export the bootstrap function + # (because we are using FUNCLIST too). + DL_FUNCS => { 'Win32::OLE' => [] }, + clean => { FILES => 'test.xls' }, ); - -# Add additional settings for the creation of PPD files -if ($ExtUtils::MakeMaker::VERSION >= 5.43) { - push @MM, 'ABSTRACT_FROM' => 'lib/Win32/OLE.pm'; - push @MM, 'AUTHOR' => 'Jan Dubois (jand@activestate.com)'; - # Actually the OLE module was originally written by hip/ActiveWare. - # It has been converted to standard Perl XS format by Gurusamy Sarathy. - # Jan Dubois is currently the most active maintainer of this module. - # Please see the OLE.pm file for complete copyright information. -} - -# XXX Enable this when MakeMaker supports 'FUNCLIST' -if ($ExtUtils::MakeMaker::VERSION >= 5.4302) { - push @MM, 'FUNCLIST' => [qw(SetSVFromVariant SetSVFromVariantEx SetVariantFromSV CreatePerlObject)]; -} - my $FUNCLIST = [qw(SetSVFromVariant SetSVFromVariantEx SetVariantFromSV CreatePerlObject)]; - -WriteMakefile(@MM); +$param{FUNCLIST} = $FUNCLIST if eval "$ExtUtils::MakeMaker::VERSION" >= 5.4302; +$param{NO_META} = 1 if eval "$ExtUtils::MakeMaker::VERSION" >= 6.10_03; +WriteMakefile(%param); sub MY::xs_c { '