diff options
author | Perl 5 Porters <perl5-porters.nicoh.com> | 1996-01-11 03:12:30 +0000 |
---|---|---|
committer | Andy Dougherty <doughera.lafayette.edu> | 1996-01-11 03:12:30 +0000 |
commit | 356fc125329f84c688474bbd2fb0c66427b1ab99 (patch) | |
tree | 0041002698edfefb0e7ba21b605ae62cb8b96b04 /installman | |
parent | 06b43eb76ef057fab08c35057263548c3f57cf74 (diff) | |
download | perl-356fc125329f84c688474bbd2fb0c66427b1ab99.tar.gz |
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.
Diffstat (limited to 'installman')
-rwxr-xr-x | installman | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/installman b/installman index 6c99682334..7d4611c84f 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); |