[svn:parrot] r39420 - in trunk: lib/Parrot t/steps t/tools/install t/tools/ops2pm
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Jun 6 03:14:51 UTC 2009
Author: jkeenan
Date: Sat Jun 6 03:14:50 2009
New Revision: 39420
URL: https://trac.parrot.org/parrot/changeset/39420
Log:
Where directory mode is explicitly passed to File::Path::mkpath(), use the
'modern' interface: { mode => 0755 } as final argument.
Modified:
trunk/lib/Parrot/Ops2pm.pm
trunk/t/steps/auto_icu-01.t
trunk/t/steps/auto_jit-01.t
trunk/t/steps/auto_pmc-01.t
trunk/t/steps/gen_platform-01.t
trunk/t/tools/install/02-install_files.t
trunk/t/tools/install/03-lines_to_files.t
trunk/t/tools/ops2pm/05-renum_op_map_file.t
trunk/t/tools/ops2pm/10-print_module.t
trunk/t/tools/ops2pm/11-print_h.t
Modified: trunk/lib/Parrot/Ops2pm.pm
==============================================================================
--- trunk/lib/Parrot/Ops2pm.pm Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/lib/Parrot/Ops2pm.pm Sat Jun 6 03:14:50 2009 (r39420)
@@ -323,7 +323,7 @@
my $cwd = cwd();
my $fulldir = File::Spec->catdir( $cwd, $self->{moddir} );
if ( !-d $fulldir ) {
- if ( !File::Path::mkpath( $fulldir, 0, 0755 ) ) {
+ if ( !File::Path::mkpath( $fulldir, { mode => 0755 } ) ) {
-d $fulldir
or die "$self->{script}: Could not mkdir $fulldir: $!!\n";
}
@@ -412,7 +412,7 @@
my $cwd = cwd();
my $fulldir = File::Spec->catdir( $cwd, $self->{inc_dir} );
if ( !-d $fulldir ) {
- if ( !File::Path::mkpath( $fulldir, 0, 0755 ) ) {
+ if ( !File::Path::mkpath( $fulldir, { mode => 0755 } ) ) {
-d $fulldir
or die "$self->{script}: Could not mkdir $fulldir: $!!\n";
}
Modified: trunk/t/steps/auto_icu-01.t
==============================================================================
--- trunk/t/steps/auto_icu-01.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/steps/auto_icu-01.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -228,7 +228,7 @@
my $expected_include_dir =
$expected_dir . $conf->data->get('slash') . q{include};
mkdir $expected_dir or croak "Unable to make testing directory";
- mkpath($expected_include_dir, 0, 0755)
+ mkpath($expected_include_dir, { mode => 0755 })
or croak "Unable to make second-level testing directory";
($icuheaders, $without) =
$step->_handle_icuheaders($conf, qq{$expected_dir\n}, 0);
Modified: trunk/t/steps/auto_jit-01.t
==============================================================================
--- trunk/t/steps/auto_jit-01.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/steps/auto_jit-01.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -50,7 +50,7 @@
my $cpuarch = 'bar';
my $osname = 'baz';
my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch );
- mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $corejitdir, { mode => 0755 } ) or croak "Unable to make testing directory";
my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} );
is( $step->_check_jitcapability($corejit, $cpuarch, $osname, 8), 0,
"Got expected value for _check_jitcapability(): no core.jit case");
@@ -65,7 +65,7 @@
my $cpuarch = 'bar';
my $osname = 'baz';
my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch );
- mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $corejitdir, { mode => 0755 } ) or croak "Unable to make testing directory";
my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} );
open my $FH, '>', $corejit
or croak "Unable to open handle to file for testing";
@@ -84,7 +84,7 @@
my $cpuarch = 'bar';
my $osname = 'baz';
my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch );
- mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $corejitdir, { mode => 0755 } ) or croak "Unable to make testing directory";
my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} );
open my $FH, '>', $corejit
or croak "Unable to open handle to file for testing";
@@ -106,7 +106,7 @@
my $cpuarch = 'i386';
my $osname = 'darwin';
my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch );
- mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $corejitdir, { mode => 0755 } ) or croak "Unable to make testing directory";
my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} );
open my $FH, '>', $corejit
or croak "Unable to open handle to file for testing";
@@ -128,7 +128,7 @@
my $cpuarch = 'i386';
my $osname = 'MSWin32';
my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch );
- mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $corejitdir, { mode => 0755 } ) or croak "Unable to make testing directory";
my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} );
open my $FH, '>', $corejit
or croak "Unable to open handle to file for testing";
@@ -152,8 +152,8 @@
my $cpuarch = 'bar';
my $jitarchname = "${cpuarch}-baz";
my $asmdir = File::Spec->catdir( $jitbase, $cpuarch );
- mkpath( $asmdir, 0, 755 ) or croak "Unable to make testing directory";
- mkpath( q{src}, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $asmdir, { mode => 0755 } ) or croak "Unable to make testing directory";
+ mkpath( q{src}, { mode => 0755 } ) or croak "Unable to make testing directory";
ok(auto::jit::_handle_asm( {
conf => $conf,
@@ -175,8 +175,8 @@
my $cpuarch = 'bar';
my $jitarchname = "${cpuarch}-baz";
my $asmdir = File::Spec->catdir( $jitbase, $cpuarch );
- mkpath( $asmdir, 0, 755 ) or croak "Unable to make testing directory";
- mkpath( q{src}, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $asmdir, { mode => 0755 } ) or croak "Unable to make testing directory";
+ mkpath( q{src}, { mode => 0755 } ) or croak "Unable to make testing directory";
my $sjit =
File::Spec->catfile( $jitbase, $cpuarch, qq{${jitarchname}.s} );
@@ -205,8 +205,8 @@
my $cpuarch = 'bar';
my $jitarchname = "${cpuarch}-baz";
my $asmdir = File::Spec->catdir( $jitbase, $cpuarch );
- mkpath( $asmdir, 0, 755 ) or croak "Unable to make testing directory";
- mkpath( q{src}, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $asmdir, { mode => 0755 } ) or croak "Unable to make testing directory";
+ mkpath( q{src}, { mode => 0755 } ) or croak "Unable to make testing directory";
my $asm = File::Spec->catfile( $jitbase, $cpuarch, q{asm.s} );
open my $FH, '>', $asm
or croak "Unable to open handle to file for testing";
@@ -314,7 +314,7 @@
my $cpuarch = 'i386';
my $osname = 'darwin';
my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch );
- mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $corejitdir, { mode => 0755 } ) or croak "Unable to make testing directory";
my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} );
open my $FH, '>', $corejit
or croak "Unable to open handle to file for testing";
Modified: trunk/t/steps/auto_pmc-01.t
==============================================================================
--- trunk/t/steps/auto_pmc-01.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/steps/auto_pmc-01.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -95,7 +95,7 @@
ok( chdir $tdir, 'changed to temp directory for testing' );
my $pmcdir = qq{$tdir/src/pmc};
- ok(mkpath($pmcdir, 0, 0755), "Able to make directory for testing");
+ ok(mkpath($pmcdir, { mode => 0755 }), "Able to make directory for testing");
my $num = qq{$pmcdir/pmc.num};
open my $IN3, ">", $num or croak "Unable to open file for writing: $!";
print $IN3 "# comment line\n";
@@ -132,7 +132,7 @@
ok( chdir $tdir, 'changed to temp directory for testing' );
my $pmcdir = qq{$tdir/src/pmc};
- ok(mkpath($pmcdir, 0, 0755), "Able to make directory for testing");
+ ok(mkpath($pmcdir, { mode => 0755 }), "Able to make directory for testing");
eval { my $order_ref = auto::pmc::get_pmc_order(); };
like($@,
qr/Can't read src\/pmc\/pmc\.num/, "Got expected 'die' message");
Modified: trunk/t/steps/gen_platform-01.t
==============================================================================
--- trunk/t/steps/gen_platform-01.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/steps/gen_platform-01.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -120,7 +120,7 @@
chdir $tdir or croak "Unable to change to temporary directory";
$conf->data->set( platform_asm => 1 );
my $platform = 'aix';
- mkpath( 'src', 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( 'src', { mode => 0755 } ) or croak "Unable to make testing directory";
my $asmfile = File::Spec->catfile( 'src', 'platform_asm.s' );
open my $FH, '>', $asmfile or croak "Unable to open handle for writing";
print $FH "Hello asm\n";
@@ -140,7 +140,7 @@
$conf->data->set( platform_asm => 1 );
my $platform = 'aix';
- mkpath( 'src', 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( 'src', { mode => 0755 } ) or croak "Unable to make testing directory";
my $asmfile = File::Spec->catfile( 'src', 'platform_asm.s' );
open my $FH, '>', $asmfile or croak "Unable to open handle for writing";
@@ -148,7 +148,7 @@
close $FH or croak "Unable to close handle after writing";
my $path = File::Spec->catdir( 'config', 'gen', 'platform', $platform );
- mkpath( $path, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $path, { mode => 0755 } ) or croak "Unable to make testing directory";
my $configfile = File::Spec->catfile( $path, 'asm.s' );
open my $FH2, '>', $configfile or croak "Unable to open handle for writing";
@@ -172,12 +172,12 @@
my $platform = 'darwin';
my $path = File::Spec->catdir( 'config', 'gen', 'platform', $platform );
- mkpath( $path, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $path, { mode => 0755 } ) or croak "Unable to make testing directory";
copy qq{$cwd/config/gen/platform/$platform/begin.c},
qq{$path/begin.c}
or croak "Unable to copy file for testing";
- mkpath( 'src', 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( 'src', { mode => 0755 } ) or croak "Unable to make testing directory";
my $plat_c = q{src/platform.c};
open my $PLATFORM_C, '>', $plat_c
or croak "Unable to open handle for writing";
Modified: trunk/t/tools/install/02-install_files.t
==============================================================================
--- trunk/t/tools/install/02-install_files.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/tools/install/02-install_files.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -10,7 +10,6 @@
use Carp;
use Cwd;
use File::Copy;
-use File::Path qw( mkpath );
use File::Temp qw( tempdir );
use lib qw( lib );
use Parrot::Install qw(
Modified: trunk/t/tools/install/03-lines_to_files.t
==============================================================================
--- trunk/t/tools/install/03-lines_to_files.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/tools/install/03-lines_to_files.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -10,7 +10,6 @@
use Carp;
use Cwd;
use File::Copy;
-use File::Path qw( mkpath );
use File::Temp qw( tempdir );
use lib qw( lib );
use Parrot::Install qw(
Modified: trunk/t/tools/ops2pm/05-renum_op_map_file.t
==============================================================================
--- trunk/t/tools/ops2pm/05-renum_op_map_file.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/tools/ops2pm/05-renum_op_map_file.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -32,7 +32,7 @@
my $tdir = tempdir( CLEANUP => 1 );
chdir $tdir or croak "Unable to change to testing directory: $!";
my $opsdir = File::Spec->catdir ( $tdir, 'src', 'ops' );
- mkpath( $opsdir, 0, 755 ) or croak "Unable to make testing directory";
+ mkpath( $opsdir, { mode => 0755 } ) or croak "Unable to make testing directory";
##### Stage 1: Generate ops.num de novo #####
Modified: trunk/t/tools/ops2pm/10-print_module.t
==============================================================================
--- trunk/t/tools/ops2pm/10-print_module.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/tools/ops2pm/10-print_module.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -188,7 +188,7 @@
Directory failure: can it be provoked?
if ( !-d $fulldir ) {
- File::Path::mkpath( $fulldir, 0, 0755 )
+ File::Path::mkpath( $fulldir, { mode => 0755 } )
or die "$self->{script}: Could not mkdir $fulldir: $!!\n";
}
Modified: trunk/t/tools/ops2pm/11-print_h.t
==============================================================================
--- trunk/t/tools/ops2pm/11-print_h.t Sat Jun 6 02:50:26 2009 (r39419)
+++ trunk/t/tools/ops2pm/11-print_h.t Sat Jun 6 03:14:50 2009 (r39420)
@@ -120,7 +120,7 @@
Directory failure: can it be provoked?
if ( !-d $fulldir ) {
- File::Path::mkpath( $fulldir, 0, 0755 )
+ File::Path::mkpath( $fulldir, { mode => 0755 } )
or die "$self->{script}: Could not mkdir $fulldir: $!!\n";
}
More information about the parrot-commits
mailing list