The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;

use ExtUtils::MakeMaker;

print "\n";
print "By default, t/test.t will use File::Temp and DBD::SQLite. \n";
print "To over-ride this, set the env vars \$DBI_DSN, \$DBI_USER and \$DBI_PASS. \n";
print "In all cases, t/test.t will use a table called 'menus'. \n";
print "\n";

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

my(%params) =
(
	($] ge '5.005') ?
	(
		AUTHOR   => 'Ron Savage (ron@savage.net.au)',
		ABSTRACT => 'Persist multiple trees in a single db table, preserving child order',
	) : (),
	clean =>
	{
		FILES => 'blib/* Makefile MANIFEST Tree-DAG_Node-Persist-*'
	},
	dist =>
	{
		COMPRESS => 'gzip',
		SUFFIX   => 'gz'
	},
	DISTNAME  => 'Tree-DAG_Node-Persist',
	NAME      => 'Tree::DAG_Node::Persist',
	LICENSE   => 'artistic_2',
	PL_FILES  => {},
	PREREQ_PM =>
	{
		'DBD::SQLite'              => 1.46,
		'DBI'                      => 1.633,
		'DBIx::Admin::CreateTable' => 2.10,
		'File::Temp'               => 0,
		'Getopt::Long'             => 2.42,
		'Hash::FieldHash'          => 0.14,
		'Pod::Usage'               => 1.65,
		'Scalar::Util'             => 1.41,
		'strict'                   => 0,
		'Test::More'               => 1.001014,
#		'Test::Pod'                => 1.48, # Make it optional. See t/pod.t
		'Tree::DAG_Node'           => 1.24,
		'warnings'                 => 0,
	},
	VERSION_FROM => 'lib/Tree/DAG_Node/Persist.pm',
);

if ( ($ExtUtils::MakeMaker::VERSION =~ /^\d\.\d\d$/) && ($ExtUtils::MakeMaker::VERSION > 6.30) )
{
	$params{LICENSE} = 'artistic_2';
}

if ($ExtUtils::MakeMaker::VERSION ge '6.46')
{
	$params{META_MERGE} =
	{
		'meta-spec' =>
		{
			version => 2,
		},
		resources   =>
		{
			bugtracker => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Tree-DAG_Node-Persist',
			license    => 'http://opensource.org/licenses/Artistic-2.0',
			repository =>
			{
				type => 'git',
				url  => 'https://github.com/ronsavage/Tree-DAG_Node-Persist.git',
				web  => 'https://github.com/ronsavage/Tree-DAG_Node-Persist',
			},
		},
	};
}

WriteMakefile(%params);