From: Perl 5 Porters Date: Thu, 11 Jan 1996 03:12:30 +0000 (+0000) Subject: perl 5.002beta2 patch: installman X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=356fc125329f84c688474bbd2fb0c66427b1ab99;p=p5sagit%2Fp5-mst-13.2.git perl 5.002beta2 patch: installman Use File::Path::mkpath instead of our own makedir(). ./perl installman --man1dir=man1 could lead to infinte recursion in old makedir() routine. Use the standard library instead. --- diff --git a/installman b/installman index 6c99682..7d4611c 100755 --- a/installman +++ b/installman @@ -3,6 +3,7 @@ BEGIN { @INC = ('lib') } use Config; use Getopt::Long; use File::Find; +use File::Path qw(mkpath); require Cwd; umask 022; @@ -76,7 +77,7 @@ sub runpod2man { # installed by occult means.) $pod2man = "../perl -I ../lib ../pod/pod2man --section=$manext --official"; - &makedir($mandir); + mkpath($mandir, 1, 0777); # In File::Path # Make a list of all the .pm and .pod files in the directory. We will # always run pod2man from the lib directory and feed it the full pathname # of the pod. This might be useful for pod2man someday. @@ -147,19 +148,6 @@ sub chmod { unless $notify; } -sub makedir { - local($dir) = @_; - unless (-d $dir) { - local($shortdir) = $dir; - - $shortdir =~ s#(.*)/.*#$1#; - &makedir($shortdir); - - print STDERR " mkdir $dir\n"; - mkdir($dir, 0777) || warn "Couldn't create $dir: $!\n" unless $notify; - } -} - sub samepath { local($p1, $p2) = @_; local($dev1, $ino1, $dev2, $ino2);