Sponsoring The Perl Toolchain Summit 2025: Help make this important event another success Learn more

use strict;
use 5.008004;
(my $mmv = ExtUtils::MakeMaker->VERSION) =~ s/_//g;
my %args = (
NAME => 'DateTime::Fiction::JRRTolkien::Shire',
VERSION_FROM => 'lib/DateTime/Fiction/JRRTolkien/Shire.pm',
PREREQ_PM => {
'Carp' => 0,
'Date::Tolkien::Shire::Data' => 0,
'DateTime' => 0.14,
'overload' => 0,
'strict' => 0,
'warnings' => 0,
},
PL_FILES => {}, # Prevent old MakeMaker from running Build.PL
'dist' => {
COMPRESS => 'gzip',
SUFFIX => 'gz',
},
AUTHOR => [
'Tom Braun <tbraun@pobox.com>',
'Tom Wyant (wyant at cpan dot org)',
],
ABSTRACT => q<DateTime omplementation of the Shire Calendar from JRR Tolkien's classic, "Lord of the Rings".>,
realclean => {
FILES => 'cover_db',
},
);
$mmv >= 6.31
and $args{LICENSE} = 'perl';
$mmv >= 6.4501
and $args{META_MERGE} = {
'meta-spec' => {
version => 2,
},
no_index => {
directory => [ qw{ inc t xt } ],
},
resources => {
bugtracker => {
mailto => 'wyant@cpan.org',
},
repository => {
type => 'git',
},
},
provides(),
};
$mmv >= 6.4701
and $args{MIN_PERL_VERSION} = 5.008004;
$mmv >= 6.5702
or $args{AUTHOR} = join ', ', @{ $args{AUTHOR} };
my $build_requires = {
# 'Test::More' => 0.88, # Because of done_testing().
};
$mmv >= 6.5501
and $args{BUILD_REQUIRES} = $build_requires
or $mmv >= 6.4501
and $args{META_MERGE}{build_requires} = $build_requires;
WriteMakefile( %args );
sub MY::postamble {
my ( $self, @args ) = @_;
my $authortest = $self->test_via_harness(
'$(FULLPERLRUN)', '$(AUTHORTEST_FILES)' );
$authortest =~ s/ \s+ \z //smx;
$authortest =~ s/ \A \s+ //smx;
chomp $authortest;
return <<"EOD";
AUTHORTEST_FILES = t/*.t xt/author/*.t
authortest :: pure_all
AUTHOR_TESTING=1 $authortest
testcover :: pure_all
cover -test
EOD
}
sub provides {
-d 'lib'
or return;
local $@ = undef;
my $provides = eval {
Module::Metadata->provides( version => 2, dir => 'lib' );
} or return;
return ( provides => $provides );
}
# ex: set textwidth=72 :