From 30ed1a768de606d2c855f6e42d8632911ea916a5 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 15 Apr 2011 12:17:07 +0000 Subject: - use File::Path and List::MoreUtils, and only import if_ from MDK::Common --- iurt_root_command | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'iurt_root_command') diff --git a/iurt_root_command b/iurt_root_command index 1880e44..57e709e 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -25,10 +25,12 @@ use lib '/usr/local/lib/perl/iurt/lib'; use strict; my $program_name = 'iurt_root_command'; use Mkcd::Commandline qw(parseCommandLine usage); -use MDK::Common; +use MDK::Common qw(if_); use File::NCopy qw(copy); use Iurt::Util qw(plog_init plog); use Cwd 'realpath'; +use File::Path qw(make_path); +use List::MoreUtils qw(any); my $arg = @ARGV; my (@params, %run); @@ -214,7 +216,7 @@ sub mkdir { plog('FAIL', "ERROR: $path creation forbidden"); } if ($opt->{parents}) { - mkdir_p $path; + make_path($path); } else { mkdir $path; } @@ -383,7 +385,7 @@ sub untar { plog('FAIL', "untar: options forbidden"); return; } - mkdir_p($dir); + make_path($dir); return !system('tar', 'xf', $file, '-C', $dir, @o_files); } -- cgit v1.2.1