use 5.006; use strict; use warnings; use Module::Build; use Config; use FileHandle; our $VERSION = '0.010'; (my $mbv = Module::Build->VERSION) =~ s/_//g; my %attr = ( dist_author => 'Tom Wyant (wyant at cpan dot org)', dist_abstract => 'Classes and app to compute satellite visibility', module_name => 'Astro::Coord::ECI', dist_name => 'Astro-satpass', dist_version_from => 'lib/Astro/Coord/ECI.pm', get_options => {y => {}, n => {}}, dynamic_config => 1, license => 'perl', ); $mbv >= 0.08 and $attr{recommends} = { 'Time::y2038' => 20081111, }; $mbv >= 0.28 and $attr{meta_merge} = { no_index => { directory => [qw{inc t}], }, resources => { bugtracker => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-satpass', }, }; $mbv >= 0.34 and $attr{auto_configure_requires} = 0; # Don't require Module::Build my $bldr = Module::Build->new (%attr); my %opt = $bldr->args (); my @exe_files; my @clean_files; my @prereq = ( 'Params::Util' => 0.25, perl => 5.006, ); print <prompt ("Do you want to install $_?", 'n') =~ m/^y/i ; } } my $stringmod = $] >= 5.008 ? '' : 'IO::String'; if (@exe_files) { push @prereq, 'Date::Manip' => 1.14; foreach (['Astro::SIMBAD::Client' => 0, < 0.016, < 0, < 0, < 0, < 0, <VERSION($version)}; $@ or next; print "\n", $info, "\n"; } if ($^O eq 'MSWin32') { @exe_files = map {"bin/$_"} @exe_files; foreach (@exe_files) {`pl2bat $_`} @clean_files = @exe_files = grep {-e $_} map {"$_.bat"} @exe_files; } elsif ($^O eq 'VMS') { foreach my $fni (map {"[.bin]$_"} @exe_files) { my $fno = "$fni.com"; my $fhi = FileHandle->new ("<$fni") or die <new (">$fno") or die <) {print $fho $_} } @clean_files = @exe_files = map {"[.bin]$_.com"} @exe_files; } else { @exe_files = map {"bin/$_"} @exe_files; } } ##my $vers = $] >= 5.008 ? '-5.8' : ''; my $vers = ''; $bldr->requires ({@prereq}); $bldr->build_requires({ 'Test::More' => 0.40, }); $bldr->add_to_cleanup (@clean_files); $bldr->script_files (\@exe_files); $bldr->create_build_script ();