Skip to content

Commit

Permalink
* Added check for not being able to determine current directory
Browse files Browse the repository at this point in the history
    (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 4eb332a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
32 changes: 30 additions & 2 deletions Makefile.PL
@@ -1,10 +1,13 @@
use ExtUtils::MakeMaker; use ExtUtils::MakeMaker;
require ExtUtils::Install; require ExtUtils::Install;


my $changed_dir_initially;

BEGIN { BEGIN {
eval { eval {
require FindBin; require FindBin;
chdir $FindBin::RealBin; chdir $FindBin::RealBin
and $changed_dir_initially = 1;
}; };
} }


Expand Down Expand Up @@ -48,7 +51,27 @@ my @chown_files = qw/
use lib './lib'; 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 # See if we have Term::ReadLine::Perl
eval { eval {
Expand All @@ -57,6 +80,7 @@ eval {
require Term::ReadKey; require Term::ReadKey;
$TermRead = 1; $TermRead = 1;
}; };

unless($@) { unless($@) {
$ENV{PERL_RL} = 'Perl'; $ENV{PERL_RL} = 'Perl';
} }
Expand Down Expand Up @@ -770,6 +794,10 @@ EOF
GetOptions(\%optctl, @options) GetOptions(\%optctl, @options)
or die "Bad option get\n"; or die "Bad option get\n";


if($MV::Default{PREFIX} and ! $changed_dir_initially) {
$origdir = cwd();
}

# use Data::Dumper; # use Data::Dumper;
# $Data::Dumper::Terse = $Data::Dumper::Indent = 2; # $Data::Dumper::Terse = $Data::Dumper::Indent = 2;
# print "ARGV: " . Dumper(\@ARGV); # print "ARGV: " . Dumper(\@ARGV);
Expand Down
4 changes: 2 additions & 2 deletions hints.pl
Expand Up @@ -19,10 +19,10 @@ sub get_hints {
while(<HINTIN>) { while(<HINTIN>) {
s/ s/
^\s*Housekeeping\s+\d+.*$ ^\s*Housekeeping\s+\d+.*$
/# Changed for $^O, no safe signals\nHousekeeping 1/xi; /# Changed for $^O, no safe signals\nHousekeeping 1/xig;
s/ s/
^\s*MaxServers\s+\d+.*$ ^\s*MaxServers\s+\d+.*$
/# Changed for $^O, no safe signals\nMaxServers 0/xi; /# Changed for $^O, no safe signals\nMaxServers 0/xig;
print HINTOUT $_; print HINTOUT $_;
} }
close HINTIN; close HINTIN;
Expand Down

0 comments on commit 4eb332a

Please sign in to comment.