diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-07-13 20:50:44 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-07-23 13:39:51 +0200 |
commit | a01f566143b97d5d074775e31bd511a83044cab6 (patch) | |
tree | 508cba8c54aece4b657dd07cde57bdb4297f5c66 /install_lib.pl | |
parent | 4c4326140484b090df4dd2ed7165e669991744cc (diff) | |
download | perl-a01f566143b97d5d074775e31bd511a83044cab6.tar.gz |
Move the wrapper for File::Path::mkpath() to install_lib.pl
installperl and installman call File::Path::mkpath with identical arguments
and options, so move the repeated code into a single place.
Diffstat (limited to 'install_lib.pl')
-rw-r--r-- | install_lib.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/install_lib.pl b/install_lib.pl index 1fe25794a2..e1163433fe 100644 --- a/install_lib.pl +++ b/install_lib.pl @@ -7,6 +7,7 @@ use strict; use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare %opts $packlist); use subs qw(unlink link chmod); +require File::Path; use Config; BEGIN { @@ -141,4 +142,8 @@ sub safe_rename { unlink($from); } +sub mkpath { + File::Path::mkpath(shift , $opts{verbose}, 0777) unless $opts{notify}; +} + 1; |