[svn:parrot] r39419 - in trunk: lib/Parrot t/tools/install
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Jun 6 02:50:28 UTC 2009
Author: jkeenan
Date: Sat Jun 6 02:50:26 2009
New Revision: 39419
URL: https://trac.parrot.org/parrot/changeset/39419
Log:
Use the 'modern' interface to File::Path::mkpath(), i.e., explicitly pass mode in hashref final argument.
Modified:
trunk/lib/Parrot/Install.pm
trunk/t/tools/install/dev_overall.t
trunk/t/tools/install/overall.t
Modified: trunk/lib/Parrot/Install.pm
==============================================================================
--- trunk/lib/Parrot/Install.pm Sat Jun 6 01:37:41 2009 (r39418)
+++ trunk/lib/Parrot/Install.pm Sat Jun 6 02:50:26 2009 (r39419)
@@ -5,7 +5,7 @@
use warnings;
use File::Basename qw(dirname);
use File::Copy;
-use File::Path; # mkpath
+use File::Path qw( mkpath );
use File::Spec;
use base qw( Exporter );
our @EXPORT_OK = qw(
@@ -175,9 +175,11 @@
sub create_directories {
my($destdir, $directories) = @_;
- mkpath([
- grep { ! -d } map { $destdir . $_ } keys %$directories
- ],0,0777);
+ my @dirs_created = mkpath(
+ ( grep { ! -d } map { $destdir . $_ } keys %$directories ),
+ { mode => 0777 },
+ );
+ return 1;
}
=head2 C<install_files()>
Modified: trunk/t/tools/install/dev_overall.t
==============================================================================
--- trunk/t/tools/install/dev_overall.t Sat Jun 6 01:37:41 2009 (r39418)
+++ trunk/t/tools/install/dev_overall.t Sat Jun 6 02:50:26 2009 (r39419)
@@ -116,7 +116,8 @@
src/pmc
);
my @created =
- mkpath( map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed );
+ mkpath( ( map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ),
+ { mode => 0777} );
print STDERR "dirs created: @created\n" if $DEBUG;
foreach my $f ( keys %testfiles ) {
my $src = File::Spec->catfile( $cwd, $testlibdir, $f );
Modified: trunk/t/tools/install/overall.t
==============================================================================
--- trunk/t/tools/install/overall.t Sat Jun 6 01:37:41 2009 (r39418)
+++ trunk/t/tools/install/overall.t Sat Jun 6 02:50:26 2009 (r39419)
@@ -101,7 +101,8 @@
compilers/pge
);
my @created =
- mkpath( map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed );
+ mkpath( ( map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ),
+ { mode => 0777 } );
print STDERR "dirs created: @created\n" if $DEBUG;
foreach my $f ( keys %testfiles ) {
my $src = File::Spec->catfile( $cwd, $testlibdir, $f );
More information about the parrot-commits
mailing list