1use 5.006; 2 3use strict; 4use warnings; 5 6use Module::Build; 7 8Module::Build->new( 9 module_name => 'DateTime::Locale', 10 dist_author => 'Dave Rolsky <autarch@urth.org>', 11 license => 'perl', 12 requires => { 13 'List::MoreUtils' => 0, 14 'Params::Validate' => '0.91', 15 perl => 5.006, 16 }, 17 build_requires => { 'Module::Build' => 0 }, 18 sign => 1, 19 create_makefile_pl => 'traditional', 20 meta_merge => { 21 resources => { 22 homepage => 'http://datetime.perl.org/', 23 bugtracker => 24 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime-Locale', 25 repository => 'http://hg.urth.org/hg/DateTime-Locale', 26 }, 27 }, 28)->create_build_script; 29 30check_conflicts(); 31 32# coped from Moose Makefile.PL 33sub check_conflicts { 34 my %conflicts = ( 35 'DateTime::Format::Strptime' => '1.1000', 36 ); 37 38 my $found = 0; 39 for my $mod ( sort keys %conflicts ) { 40 eval "require $mod"; 41 next if $@; 42 43 my $installed = $mod->VERSION(); 44 if ( $installed le $conflicts{$mod} ) { 45 46 print <<"EOF"; 47 48*** 49 This version of DateTime::Locale conflicts with the version of 50 $mod ($installed) you have installed. 51 52 You will need to upgrade $mod after installing this version of 53 DateTime::Locale. 54*** 55 56EOF 57 58 $found = 1; 59 } 60 } 61 62 return unless $found; 63 64 # More or less copied from Module::Build 65 return if $ENV{PERL_MM_USE_DEFAULT}; 66 return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) ); 67 68 sleep 4; 69} 70