Added the CPAN distribution metadata to Makefile.PL and Build.PL.

This commit is contained in:
依瑪貓 2021-02-08 10:51:20 +08:00
parent 4bf7966a4c
commit 9c8d38af94
2 changed files with 31 additions and 8 deletions

View File

@ -302,6 +302,21 @@ my $build = Module::Build->new(
"Module::Signature" => 0, "Module::Signature" => 0,
}, },
add_to_cleanup => [ "t/Config.pm", "TAGS" ], add_to_cleanup => [ "t/Config.pm", "TAGS" ],
meta_merge => {
"meta-spec" => { version => 2 },
resources => {
homepage => "https://metacpan.org/release/DbFramework",
repository => {
type => "git",
url => "git://github.com/imacat/DbFramework.git",
web => "https://github.com/imacat/DbFramework",
},
bugtracker => {
"web" => "https://github.com/imacat/DbFramework/issues"
}
},
},
); );
$build->create_build_script; $build->create_build_script;

View File

@ -284,19 +284,12 @@ CREATE TABLE c_table (
} }
} }
# LICENSE is only availabe since ExtUtils::MakeMaker 6.30_01
use vars qw(%license $eummver);
%license = qw();
$eummver = $ExtUtils::MakeMaker::VERSION;
$eummver =~ s/_//;
%license = (LICENSE => "perl") if $eummver > 6.30;
WriteMakefile( WriteMakefile(
NAME => "DbFramework", NAME => "DbFramework",
VERSION => "1.12", VERSION => "1.12",
ABSTRACT => "Classes for Manipulating DBI Databases, Based on the CDIF Data Model Subject Area", ABSTRACT => "Classes for Manipulating DBI Databases, Based on the CDIF Data Model Subject Area",
AUTHOR => "imacat <imacat\@mail.imacat.idv.tw>", AUTHOR => "imacat <imacat\@mail.imacat.idv.tw>",
%license, LICENSE => "perl",
PREREQ_PM => { PREREQ_PM => {
"Alias" => 0, "Alias" => 0,
"DBI" => 1.06, "DBI" => 1.06,
@ -315,4 +308,19 @@ WriteMakefile(
clean => { clean => {
FILES => "t/Config.pm TAGS", FILES => "t/Config.pm TAGS",
}, },
META_MERGE => {
"meta-spec" => { version => 2 },
resources => {
homepage => "https://metacpan.org/release/DbFramework",
repository => {
type => "git",
url => "git://github.com/imacat/DbFramework.git",
web => "https://github.com/imacat/DbFramework",
},
bugtracker => {
"web" => "https://github.com/imacat/DbFramework/issues"
}
},
},
); );