Permalink
Browse files

* Added check for not being able to determine current directory

    (non readable parent path) and ask for information.

  * Fixed BSD hints so that it changes all instances of MaxServers
    to 0.
  • Loading branch information...
perusionmike committed Dec 19, 2000
1 parent 67daaf1 commit 4eb332a074f8c26df251d782fe0439bc8c85f7ce
Showing with 32 additions and 4 deletions.
  1. +30 −2 Makefile.PL
  2. +2 −2 hints.pl
View
@@ -1,10 +1,13 @@
use ExtUtils::MakeMaker;
require ExtUtils::Install;
+my $changed_dir_initially;
+
BEGIN {
eval {
require FindBin;
- chdir $FindBin::RealBin;
+ chdir $FindBin::RealBin
+ and $changed_dir_initially = 1;
};
}
@@ -48,7 +51,27 @@ my @chown_files = qw/
use lib './lib';
-my $origdir = cwd();
+my $origdir;
+if ($changed_dir_initially) {
+ $origdir = cwd();
+}
+elsif($ENV{PWD}) {
+ ## We will try
+ $origdir = $ENV{PWD};
+}
+else {
+ print <<EOF;
+We know this sounds dumb, but we need to know the current directory. Your
+system administratory appears to have set up your system so that you cannot
+search the directory path above you. Were you to ever change directory
+to /tmp or something, you couldn't even walk the tree back to your own
+directory.
+
+EOF
+
+ $origdir = my_prompt(qq{What is the directory you are in currently? });
+
+}
# See if we have Term::ReadLine::Perl
eval {
@@ -57,6 +80,7 @@ eval {
require Term::ReadKey;
$TermRead = 1;
};
+
unless($@) {
$ENV{PERL_RL} = 'Perl';
}
@@ -770,6 +794,10 @@ EOF
GetOptions(\%optctl, @options)
or die "Bad option get\n";
+ if($MV::Default{PREFIX} and ! $changed_dir_initially) {
+ $origdir = cwd();
+ }
+
# use Data::Dumper;
# $Data::Dumper::Terse = $Data::Dumper::Indent = 2;
# print "ARGV: " . Dumper(\@ARGV);
View
@@ -19,10 +19,10 @@ sub get_hints {
while(<HINTIN>) {
s/
^\s*Housekeeping\s+\d+.*$
- /# Changed for $^O, no safe signals\nHousekeeping 1/xi;
+ /# Changed for $^O, no safe signals\nHousekeeping 1/xig;
s/
^\s*MaxServers\s+\d+.*$
- /# Changed for $^O, no safe signals\nMaxServers 0/xi;
+ /# Changed for $^O, no safe signals\nMaxServers 0/xig;
print HINTOUT $_;
}
close HINTIN;

0 comments on commit 4eb332a

Please sign in to comment.