Skip Menu |

Preferred bug tracker

Please email the preferred bug tracker to report your issue.

This queue is for tickets about the Astro-SpaceTrack CPAN distribution.

Report information
The Basics
Id: 39245
Status: resolved
Priority: 0/
Queue: Astro-SpaceTrack

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in:
  • 0.032
  • 0.023
  • 0.024
  • 0.025
  • 0.026
  • 0.027
  • 0.028
  • 0.029
  • 0.030
  • 0.031
Fixed in: 0.033



Subject: -y for Build.PL?
If using Makefile.PL, then the -y option seems to work. But with perl Build.PL this does not seem to work; the "Do you want to install SpaceTrack" question appears. Regards, Slaven
On Sat Sep 13 07:12:17 2008, SREZIC wrote: Show quoted text
> If using Makefile.PL, then the -y option seems to work. But with perl > Build.PL this does not seem to work; the "Do you want to install > SpaceTrack" question appears. > > Regards, > Slaven
Thanks for the report. The same bug turned up in Games::Sudoku::General. Somehow in a brain-dead moment I typed my %opt => $bldr->args(); when I meant "=" rather than "=>". At the moment I'm trying to clarify the status of Iridium 28 (OID 24948); soon as this happens, I'll release. In the meantime, the revised Build.PL is attached.
use 5.006; use strict; use warnings; use Config; use FileHandle; use Module::Build; # Generate a builder object. my $bldr = Module::Build->new ( dist_author => 'Tom Wyant (wyant at cpan dot org)', dist_abstract => 'Download satellite orbital elements from Space Track', module_name => 'Astro::SpaceTrack', ## dist_name => 'Astro-SpaceTrack', ## dist_version_from => 'SpaceTrack.pm', get_options => {y => {}, n => {}}, dynamic_config => 1, license => 'perl', ); # Find out what the user wants to do. my %opt = $bldr->args (); my @exe_files; my @clean_files; my @possible_exes = ('SpaceTrack'); my $tk = eval {require Tk} and push @possible_exes, 'SpaceTrackTk'; print $tk ? <<eod : <<eod; The following scripts can be installed: SpaceTrack is an interactive interface to Astro::SpaceTrack; SpaceTrackTk is a windowed interface to Astro::SpaceTrack, using Perl/Tk. eod The following script can be installed: SpaceTrack is an interactive interface to Astro::SpaceTrack. SpaceTrackTk, a windowed interface to Astro::SpaceTrack, is provided but will not be installed because you do not have the Tk package installed. If you want this, install Tk and then rerun Makefile.PL. eod if ($opt{n}) { print "Because you have asserted -n, the executables will not be installed.\n\n"; } elsif ($opt{y}) { print "Because you have asserted -y, the executables will be installed.\n\n"; @exe_files = @possible_exes; } else { print <<eod; To supress the following prompts, run Makefile.PL with the -y option to install the scripts, or with the -n option not to install the scripts. Setting environment variable PERL_MM_USE_DEFAULT true, or running non- interactively without data on STDIN will also cause the scripts not to be installed. eod foreach (@possible_exes) { push @exe_files, $_ if $bldr->prompt ("Do you want to install $_?", 'n') =~ m/^y/i ; } } if (@exe_files) { 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 <<eod; Error - Unable to open $fni $! eod my $fho = FileHandle->new (">$fno") or die <<eod; Error - Unable to open $fno $! eod print $fho "$Config{startperl}\n"; while (<$fhi>) {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 = ''; # Tell Module::Build what we want to do. ## $bldr->requires ($^O eq 'MSWin32' ? {} : {'LWP::UserAgent' => 0}); $bldr->requires ({ 'Compress::Zlib' => 0, 'HTML::Parser' => 0, 'HTTP::Response' => 0, 'HTTP::Status' => 0, 'LWP::UserAgent' => 0, }); $bldr->add_to_cleanup (\@clean_files); $bldr->script_files (\@exe_files); # Generate the build script, at long last. $bldr->create_build_script ();
Fixed in version 0.33, I believe. I'll leave the ticket open for a few days, in case others' experience differs from mine.