1use strict;
2use warnings;
3use ExtUtils::MakeMaker;
4
5my %conf = (
6    NAME           => 'Geo::Coder::TomTom',
7    AUTHOR         => 'gray <gray@cpan.org>',
8    LICENSE        => 'perl',
9    VERSION_FROM   => 'lib/Geo/Coder/TomTom.pm',
10    ABSTRACT_FROM  => 'lib/Geo/Coder/TomTom.pm',
11    PREREQ_PM      => {
12        'Encode'         => 0,
13        'JSON'           => 2.0,
14        'LWP::UserAgent' => 0,
15        'URI'            => 1.36,
16    },
17    BUILD_REQUIRES => { 'Test::More' => 0.82, },
18    META_MERGE     => {
19        resources  => {
20            repository => 'http://github.com/gray/geo-coder-tomtom',
21        },
22        recommends => {
23            'JSON::XS'             => 2.0,
24            'LWP::Protocol::https' => 6.02,
25        },
26    },
27    dist  => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
28    clean => { FILES => 'Geo-Coder-TomTom-*' },
29);
30
31my $eumm_version=$ExtUtils::MakeMaker::VERSION;
32delete $conf{META_MERGE} if $eumm_version < 6.46;
33$conf{PREREQ_PM} = {
34    %{ $conf{PREREQ_PM} || {} }, %{ delete $conf{BUILD_REQUIRES} },
35} if ($conf{BUILD_REQUIRES} and $eumm_version < 6.5503);
36
37WriteMakefile(%conf);
38
39
40sub MY::postamble {
41    return <<"    MAKE_FRAG";
42authortest:
43\t\$(MAKE) -e \$(TEST_TYPE) TEST_FILES="xt/*.t"
44    MAKE_FRAG
45}
46
47sub MY::dist_test {
48    my $self = shift;
49    return $self->MM::dist_test . <<"    MAKE_FRAG";
50\tcd \$(DISTVNAME) && \$(MAKE) authortest \$(PASTHRU)
51    MAKE_FRAG
52}
53