[svn:parrot] r39589 - trunk/lib/Parrot

Util at svn.parrot.org Util at svn.parrot.org
Tue Jun 16 14:22:35 UTC 2009


Author: Util
Date: Tue Jun 16 14:22:35 2009
New Revision: 39589
URL: https://trac.parrot.org/parrot/changeset/39589

Log:
[install] Changed to support old File::Path modules

Modified:
   trunk/lib/Parrot/Install.pm

Modified: trunk/lib/Parrot/Install.pm
==============================================================================
--- trunk/lib/Parrot/Install.pm	Tue Jun 16 13:55:40 2009	(r39588)
+++ trunk/lib/Parrot/Install.pm	Tue Jun 16 14:22:35 2009	(r39589)
@@ -173,12 +173,16 @@
 =cut
 
 sub create_directories {
-    my($destdir, $directories) = @_;
+    my ( $destdir, $directories ) = @_;
+
+    my @dirs_to_create = grep { ! -d } map { $destdir . $_ } sort keys %{$directories};
+
+    my $print_the_dirs = 0;
+    my $mode = oct('0777');
+
+    # We must use the legacy interface to support File::Path versions before 2.01.
+    my @dirs_created = mkpath( \@dirs_to_create, $print_the_dirs, $mode );
 
-    my @dirs_created = mkpath(
-        ( grep { ! -d } map { $destdir . $_ } keys %$directories ),
-        { mode => 0777 },
-    );
     return 1;
 }
 


More information about the parrot-commits mailing list