[Bps-public-commit] r15662 - in Shipwright/trunk: . lib lib/Shipwright/Backend lib/Shipwright/Script lib/Shipwright/Source share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Aug 30 00:01:54 EDT 2008


Author: sunnavy
Date: Sat Aug 30 00:01:45 2008
New Revision: 15662

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright.pm
   Shipwright/trunk/lib/Shipwright/Backend/Base.pm
   Shipwright/trunk/lib/Shipwright/Backend/FS.pm
   Shipwright/trunk/lib/Shipwright/Backend/SVK.pm
   Shipwright/trunk/lib/Shipwright/Backend/SVN.pm
   Shipwright/trunk/lib/Shipwright/Build.pm
   Shipwright/trunk/lib/Shipwright/Script/Build.pm
   Shipwright/trunk/lib/Shipwright/Script/Create.pm
   Shipwright/trunk/lib/Shipwright/Script/Delete.pm
   Shipwright/trunk/lib/Shipwright/Script/Import.pm
   Shipwright/trunk/lib/Shipwright/Script/Rename.pm
   Shipwright/trunk/lib/Shipwright/Script/Update.pm
   Shipwright/trunk/lib/Shipwright/Source.pm
   Shipwright/trunk/lib/Shipwright/Source/Base.pm
   Shipwright/trunk/lib/Shipwright/Source/CPAN.pm
   Shipwright/trunk/lib/Shipwright/Source/Compressed.pm
   Shipwright/trunk/lib/Shipwright/Source/Directory.pm
   Shipwright/trunk/lib/Shipwright/Source/HTTP.pm
   Shipwright/trunk/lib/Shipwright/Source/SVK.pm
   Shipwright/trunk/lib/Shipwright/Source/SVN.pm
   Shipwright/trunk/lib/Shipwright/Source/Shipwright.pm
   Shipwright/trunk/lib/Shipwright/Test.pm
   Shipwright/trunk/share/bin/shipwright-builder

Log:
 r16310 at sunnavys-mb:  sunnavy | 2008-08-30 11:37:50 +0800
 use catdir with dir


Modified: Shipwright/trunk/lib/Shipwright.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright.pm	(original)
+++ Shipwright/trunk/lib/Shipwright.pm	Sat Aug 30 00:01:45 2008
@@ -16,7 +16,7 @@
 use Shipwright::Source;
 use Shipwright::Build;
 use File::Temp qw/tempdir/;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catfile/;
 
 sub new {
     my $class = shift;

Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm	Sat Aug 30 00:01:45 2008
@@ -62,7 +62,7 @@
     dircopy( Shipwright::Util->share_root, $dir );
 
     # copy YAML/Tiny.pm to inc/
-    my $yaml_tiny_path = catfile( $dir, 'inc', 'YAML' );
+    my $yaml_tiny_path = catdir( $dir, 'inc', 'YAML' );
     mkpath $yaml_tiny_path;
     require Module::Info;
     copy( Module::Info->new_from_module('YAML::Tiny')->file, $yaml_tiny_path )
@@ -70,7 +70,7 @@
 
     # share_root can't keep empty dirs, we have to create them manually
     for (qw/scripts t sources/) {
-        mkdir catfile( $dir, $_ );
+        mkdir catdir( $dir, $_ );
     }
 
     # hack for share_root living under blib/

Modified: Shipwright/trunk/lib/Shipwright/Backend/FS.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/FS.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/FS.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 use Carp;
-use File::Spec::Functions qw/catfile catdir splitdir/;
+use File::Spec::Functions qw/catfile splitdir/;
 use Shipwright::Util;
 use File::Copy qw/copy/;
 use File::Copy::Recursive qw/dircopy/;

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catfile/;
 use Shipwright::Util;
 use File::Temp qw/tempdir/;
 use File::Copy qw/copy/;

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catfile/;
 use Shipwright::Util;
 use File::Temp qw/tempdir/;
 use File::Copy qw/copy/;

Modified: Shipwright/trunk/lib/Shipwright/Build.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Build.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Build.pm	Sat Aug 30 00:01:45 2008
@@ -50,20 +50,20 @@
     no warnings 'uninitialized';
 
     $ENV{DYLD_LIBRARY_PATH} =
-      catfile( $self->install_base, 'lib' ) . ':' . $ENV{DYLD_LIBRARY_PATH};
+      catdir( $self->install_base, 'lib' ) . ':' . $ENV{DYLD_LIBRARY_PATH};
     $ENV{LD_LIBRARY_PATH} =
-      catfile( $self->install_base, 'lib' ) . ':' . $ENV{LD_LIBRARY_PATH};
+      catdir( $self->install_base, 'lib' ) . ':' . $ENV{LD_LIBRARY_PATH};
     $ENV{PERL5LIB} =
-        catfile( $self->install_base, 'lib', 'perl5', 'site_perl' ) . ':'
-      . catfile( $self->install_base, 'lib', 'perl5' ) . ':'
+        catdir( $self->install_base, 'lib', 'perl5', 'site_perl' ) . ':'
+      . catdir( $self->install_base, 'lib', 'perl5' ) . ':'
       . $ENV{PERL5LIB};
     $ENV{PATH} =
-        catfile( $self->install_base, 'bin' ) . ':'
-      . catfile( $self->install_base, 'sbin' ) . ':'
+        catdir( $self->install_base, 'bin' ) . ':'
+      . catdir( $self->install_base, 'sbin' ) . ':'
       . $ENV{PATH};
     $ENV{PERL_MM_USE_DEFAULT} = 1;
-    $ENV{LDFLAGS} .= ' -L' . catfile( $self->install_base, 'lib' );
-    $ENV{CFLAGS}  .= ' -I' . catfile( $self->install_base, 'include' );
+    $ENV{LDFLAGS} .= ' -L' . catdir( $self->install_base, 'lib' );
+    $ENV{CFLAGS}  .= ' -I' . catdir( $self->install_base, 'include' );
 
     require CPAN;
     require Module::Info;
@@ -104,7 +104,7 @@
         $self->test;
     }
     else {
-        dircopy( 'etc', catfile( $self->install_base, 'etc' ) );
+        dircopy( 'etc', catdir( $self->install_base, 'etc' ) );
 
         my $installed_hash = {};
         $installed_file = catfile( $self->install_base, 'installed.yml' );
@@ -220,7 +220,7 @@
           && confess "cp sources/$dir/$branches->{$dir}[0] to dists/$dir failed";
     }
 
-    chdir catfile( 'dists', $dir );
+    chdir catdir( 'dists', $dir );
 
     if ( -e catfile( '..', '..', 'scripts', $dir, 'build.pl' ) ) {
         $self->log->info(
@@ -306,8 +306,8 @@
         }
 
         my $dir = ( splitdir($File::Find::dir) )[-1];
-        mkdir catfile( $self->install_base,       "$dir-wrapped" )
-          unless -d catfile( $self->install_base, "$dir-wrapped" );
+        mkdir catdir( $self->install_base,       "$dir-wrapped" )
+          unless -d catdir( $self->install_base, "$dir-wrapped" );
 
         if ( -e catfile( $self->install_base, "$dir-wrapped", $file ) ) {
             $self->log->warn( 'found old '
@@ -337,7 +337,7 @@
             }
         }
 
-        move( $file => catfile( $self->install_base, "$dir-wrapped" ) )
+        move( $file => catdir( $self->install_base, "$dir-wrapped" ) )
           or confess $!;
 
     # if we have this $type(e.g. perl) installed and have that specific wrapper,
@@ -358,7 +358,7 @@
 
     my @dirs =
       grep { -d $_ }
-      map { catfile( $self->install_base, $_ ) } qw/bin sbin/;
+      map { catdir( $self->install_base, $_ ) } qw/bin sbin/;
     find( $sub, @dirs ) if @dirs;
 }
 

Modified: Shipwright/trunk/lib/Shipwright/Script/Build.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Build.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Build.pm	Sat Aug 30 00:01:45 2008
@@ -12,6 +12,7 @@
 
 use Shipwright;
 use Cwd 'abs_path';
+use File::Spec::Functions qw/catdir/;
 
 sub options {
     (
@@ -86,7 +87,7 @@
 
     my $dists_dir = $shipwright->build->build_base;
     for my $name ( keys %source ) {
-        my $dir = catfile( $dists_dir, 'dists', $name );
+        my $dir = catdir( $dists_dir, 'dists', $name );
         system("rm -rf $dir");
         system("cp -r $source{$name} $dir");
     }

Modified: Shipwright/trunk/lib/Shipwright/Script/Create.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Create.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Create.pm	Sat Aug 30 00:01:45 2008
@@ -7,7 +7,6 @@
 use base qw/App::CLI::Command Shipwright::Script/;
 
 use Shipwright;
-use File::Spec::Functions qw/catfile catdir/;
 use Shipwright::Util;
 
 sub run {

Modified: Shipwright/trunk/lib/Shipwright/Script/Delete.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Delete.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Delete.pm	Sat Aug 30 00:01:45 2008
@@ -7,7 +7,6 @@
 use base qw/App::CLI::Command Shipwright::Script/;
 
 use Shipwright;
-use File::Spec::Functions qw/catfile catdir/;
 use Shipwright::Util;
 
 sub run {

Modified: Shipwright/trunk/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Import.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Import.pm	Sat Aug 30 00:01:45 2008
@@ -367,7 +367,7 @@
     my $source = shift;
     my @dirs   = splitdir($source);
     pop @dirs;
-    return catfile(@dirs);
+    return catdir(@dirs);
 }
 
 1;

Modified: Shipwright/trunk/lib/Shipwright/Script/Rename.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Rename.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Rename.pm	Sat Aug 30 00:01:45 2008
@@ -7,7 +7,6 @@
 use base qw/App::CLI::Command Shipwright::Script/;
 
 use Shipwright;
-use File::Spec::Functions qw/catfile catdir/;
 use Shipwright::Util;
 
 sub run {

Modified: Shipwright/trunk/lib/Shipwright/Script/Update.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Update.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Update.pm	Sat Aug 30 00:01:45 2008
@@ -8,7 +8,7 @@
 __PACKAGE__->mk_accessors(qw/all follow builder utility version/);
 
 use Shipwright;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catdir/;
 use Shipwright::Util;
 use File::Copy qw/copy move/;
 use File::Temp qw/tempdir/;
@@ -138,7 +138,7 @@
     $version = Shipwright::Util::LoadFile( $shipwright->source->version_path );
 
     $shipwright->backend->import(
-        source    => catfile( $shipwright->source->directory, $name ),
+        source    => catdir( $shipwright->source->directory, $name ),
         comment   => "update $name",
         overwrite => 1,
         version   => $version->{$name},

Modified: Shipwright/trunk/lib/Shipwright/Source.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source.pm	Sat Aug 30 00:01:45 2008
@@ -14,8 +14,8 @@
 
 $DEFAULT{directory} =
   tempdir( 'shipwright_source_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
-$DEFAULT{scripts_directory}  = catfile( $DEFAULT{directory}, '__scripts' );
-$DEFAULT{download_directory} = catfile( $DEFAULT{directory}, '__download' );
+$DEFAULT{scripts_directory}  = catdir( $DEFAULT{directory}, '__scripts' );
+$DEFAULT{download_directory} = catdir( $DEFAULT{directory}, '__download' );
 $DEFAULT{map_path}           = catfile( $DEFAULT{directory}, 'map.yml' );
 $DEFAULT{url_path}           = catfile( $DEFAULT{directory}, 'url.yml' );
 $DEFAULT{version_path}       = catfile( $DEFAULT{directory}, 'version.yml' );

Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm	Sat Aug 30 00:01:45 2008
@@ -86,7 +86,7 @@
 
         # if not found, we'll create one according to Build.PL or Makefile.PL
         my $require = {};
-        chdir catfile($path);
+        chdir catdir($path);
 
         if ( -e 'Build.PL' ) {
             Shipwright::Util->run( [ $^X, 'Build.PL' ] );

Modified: Shipwright/trunk/lib/Shipwright/Source/CPAN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/CPAN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/CPAN.pm	Sat Aug 30 00:01:45 2008
@@ -8,7 +8,6 @@
 use CPAN;
 use Data::Dumper;
 use File::Temp qw/tempdir/;
-use File::Spec::Functions qw/catfile catdir/;
 use File::Slurp;
 use CPAN::DistnameInfo;
 
@@ -38,17 +37,17 @@
         require CPAN::Config;
     }
 
-    mkdir catfile( $cpan_dir, 'CPAN' );
+    mkdir catdir( $cpan_dir, 'CPAN' );
     my $config_file = catfile( $cpan_dir, 'CPAN', 'MyConfig.pm' );
 
     unless ( -f $config_file ) {
 
         # hack $CPAN::Config, mostly to make cpan stuff temporary
-        $CPAN::Config->{cpan_home}         = catfile($cpan_dir);
-        $CPAN::Config->{build_dir}         = catfile( $cpan_dir, 'build' );
+        $CPAN::Config->{cpan_home}         = catdir($cpan_dir);
+        $CPAN::Config->{build_dir}         = catdir( $cpan_dir, 'build' );
         $CPAN::Config->{histfile}          = catfile( $cpan_dir, 'histfile' );
-        $CPAN::Config->{keep_source_where} = catfile( $cpan_dir, 'sources' );
-        $CPAN::Config->{prefs_dir}         = catfile( $cpan_dir, 'prefs' );
+        $CPAN::Config->{keep_source_where} = catdir( $cpan_dir, 'sources' );
+        $CPAN::Config->{prefs_dir}         = catdir( $cpan_dir, 'prefs' );
         $CPAN::Config->{prerequisites_policy} = 'follow';
         $CPAN::Config->{urllist}              = [];
         write_file( $config_file,

Modified: Shipwright/trunk/lib/Shipwright/Source/Compressed.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Compressed.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Compressed.pm	Sat Aug 30 00:01:45 2008
@@ -30,9 +30,9 @@
     my $ret = $self->SUPER::run(@_);
 
     # follow only if --follow and we really added new stuff.
-    $self->_follow( catfile( $self->directory, $self->name ) )
+    $self->_follow( catdir( $self->directory, $self->name ) )
       if $self->follow && $newer;
-    return catfile( $self->directory, $self->name );
+    return catdir( $self->directory, $self->name );
 }
 
 =head2 path
@@ -72,8 +72,8 @@
     my $arg;
 
     my ( $from, $to );
-    $from = catfile( $self->directory, $self->path );
-    $to   = catfile( $self->directory, $self->name );
+    $from = catdir( $self->directory, $self->path );
+    $to   = catdir( $self->directory, $self->name );
 
     # if it already exists, assuming we have processed it already, don't do it
     # again

Modified: Shipwright/trunk/lib/Shipwright/Source/Directory.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Directory.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Directory.pm	Sat Aug 30 00:01:45 2008
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catdir/;
 use File::Basename;
 
 use base qw/Shipwright::Source::Base/;
@@ -42,11 +42,11 @@
 
     # follow only if --follow and we really added new stuff.
     $self->_follow(
-        catfile(
+        catdir(
             $self->directory, $self->name || $self->just_name( $self->path )
         )
     ) if $self->follow && $newer;
-    return catfile( $self->directory,
+    return catdir( $self->directory,
         $self->name || $self->just_name( $self->path ) );
 }
 
@@ -64,7 +64,7 @@
 sub _cmd {
     my $self = shift;
     my $to =
-      catfile( $self->directory,
+      catdir( $self->directory,
         $self->name || $self->just_name( $self->path ) );
     return if -e $to;
 

Modified: Shipwright/trunk/lib/Shipwright/Source/HTTP.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/HTTP.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/HTTP.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catfile/;
 use Shipwright::Source::Compressed;
 
 use base qw/Shipwright::Source::Base/;

Modified: Shipwright/trunk/lib/Shipwright/Source/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/SVK.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/SVK.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catdir/;
 
 use base qw/Shipwright::Source::Base/;
 
@@ -54,11 +54,11 @@
     push @cmds,
       [
         'svk', 'co', $self->source,
-        catfile( $self->download_directory, $self->name ),
+        catdir( $self->download_directory, $self->name ),
         $self->version ? ( '-r', $self->version ) : ()
       ];
     push @cmds,
-      [ 'svk', 'co', '-d', catfile( $self->download_directory, $self->name ), ];
+      [ 'svk', 'co', '-d', catdir( $self->download_directory, $self->name ), ];
 
     unless ( $self->version ) {
         my ($out) = Shipwright::Util->run( [ 'svk', 'info', $self->source, ] );
@@ -68,7 +68,7 @@
         }
     }
 
-    $self->source( catfile( $self->download_directory, $self->name ) );
+    $self->source( catdir( $self->download_directory, $self->name ) );
     Shipwright::Util->run($_) for @cmds;
 }
 

Modified: Shipwright/trunk/lib/Shipwright/Source/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/SVN.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catdir/;
 
 use base qw/Shipwright::Source::Base/;
 
@@ -51,7 +51,7 @@
 
     my $cmd = [
         'svn', 'export', $self->source,
-        catfile( $self->download_directory, $self->name ),
+        catdir( $self->download_directory, $self->name ),
         $self->version ? ( '-r', $self->version ) : (),
     ];
 
@@ -63,7 +63,7 @@
         }
     }
 
-    $self->source( catfile( $self->download_directory, $self->name ) );
+    $self->source( catdir( $self->download_directory, $self->name ) );
     Shipwright::Util->run($cmd);
 }
 

Modified: Shipwright/trunk/lib/Shipwright/Source/Shipwright.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Shipwright.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Shipwright.pm	Sat Aug 30 00:01:45 2008
@@ -3,7 +3,7 @@
 use warnings;
 
 use Carp;
-use File::Spec::Functions qw/catfile catdir/;
+use File::Spec::Functions qw/catdir/;
 
 use base qw/Shipwright::Source::Base/;
 
@@ -22,19 +22,19 @@
 
     if ( $source_shipwright->backend->has_branch_support ) {
         $source_shipwright->backend->export(
-            target => catfile( $self->directory, $self->name ),
+            target => catdir( $self->directory, $self->name ),
             path   => "/sources/$dist",
         );
     }
     else {
         $source_shipwright->backend->export(
-            target => catfile( $self->directory, $self->name ),
+            target => catdir( $self->directory, $self->name ),
             path   => "/dists/$dist",
         );
     }
 
     $source_shipwright->backend->export(
-        target => catfile( $self->scripts_directory, $self->name ),
+        target => catdir( $self->scripts_directory, $self->name ),
         path   => "/scripts/$dist",
     );
 
@@ -56,7 +56,7 @@
 
         for my $type ( keys %$require ) {
             for my $req ( keys %{ $require->{$type} } ) {
-                unless ( -e catfile( $self->directory, $req ) ) {
+                unless ( -e catdir( $self->directory, $req ) ) {
                     my $s = Shipwright::Source->new(
                         %$self,
                         source => "shipwright:$base/$req",
@@ -68,7 +68,7 @@
         }
     }
 
-    return catfile( $self->directory, $self->name );
+    return catdir( $self->directory, $self->name );
 }
 
 1;

Modified: Shipwright/trunk/lib/Shipwright/Test.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Test.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Test.pm	Sat Aug 30 00:01:45 2008
@@ -74,7 +74,7 @@
 
 sub create_svk_repo {
     $ENV{SVKROOT} = tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
-    my $svk_root_local = catfile( $ENV{SVKROOT}, 'local' );
+    my $svk_root_local = catdir( $ENV{SVKROOT}, 'local' );
     system("svnadmin create $svk_root_local");
     system("svk depotmap -i");
     return $ENV{SVKROOT};

Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Sat Aug 30 00:01:45 2008
@@ -109,7 +109,7 @@
 
 unless ( $args{'install-base'} ) {
     my $dir = tempdir( 'vessel_' . $args{name} . '-XXXXXX', TMPDIR => 1 );
-    $args{'install-base'} = catfile( $dir, $args{name} );
+    $args{'install-base'} = catdir( $dir, $args{name} );
     print "no default install-base, will set it to $args{'install-base'}\n";
 }
 
@@ -238,29 +238,29 @@
     {
         no warnings 'uninitialized';
         $ENV{DYLD_LIBRARY_PATH} =
-          catfile( $args{'install-base'}, 'lib' ) . ':'
+          catdir( $args{'install-base'}, 'lib' ) . ':'
           . $ENV{DYLD_LIBRARY_PATH};
         $ENV{LD_LIBRARY_PATH} =
-          catfile( $args{'install-base'}, 'lib' ) . ':' . $ENV{LD_LIBRARY_PATH};
+          catdir( $args{'install-base'}, 'lib' ) . ':' . $ENV{LD_LIBRARY_PATH};
         $ENV{PERL5LIB} =
-            catfile( $args{'install-base'}, 'lib', 'perl5', 'site_perl' ) . ':'
-          . catfile( $args{'install-base'}, 'lib', 'perl5' ) . ':'
+            catdir( $args{'install-base'}, 'lib', 'perl5', 'site_perl' ) . ':'
+          . catdir( $args{'install-base'}, 'lib', 'perl5' ) . ':'
           . $ENV{PERL5LIB};
         $ENV{PATH} =
-            catfile( $args{'install-base'}, 'bin' ) . ':'
-          . catfile( $args{'install-base'}, 'sbin' ) . ':'
+            catdir( $args{'install-base'}, 'bin' ) . ':'
+          . catdir( $args{'install-base'}, 'sbin' ) . ':'
           . $ENV{PATH};
         $ENV{PERL_MM_USE_DEFAULT} = 1;
-        $ENV{LDFLAGS} .= ' -L' . catfile( $args{'install-base'}, 'lib' );
-        $ENV{CFLAGS}  .= ' -I' . catfile( $args{'install-base'}, 'include' );
+        $ENV{LDFLAGS} .= ' -L' . catdir( $args{'install-base'}, 'lib' );
+        $ENV{CFLAGS}  .= ' -I' . catdir( $args{'install-base'}, 'include' );
     }
 
     mkpath $args{'install-base'} unless -e $args{'install-base'};
 
-    mkdir catfile( $args{'install-base'},       'etc' )
-      unless -e catfile( $args{'install-base'}, 'etc' );
-    mkdir catfile( $args{'install-base'},       'tools' )
-      unless -e catfile( $args{'install-base'}, 'tools' );
+    mkdir catdir( $args{'install-base'},       'etc' )
+      unless -e catdir( $args{'install-base'}, 'etc' );
+    mkdir catdir( $args{'install-base'},       'tools' )
+      unless -e catdir( $args{'install-base'}, 'tools' );
 
     for ( 'shipwright-script-wrapper', 'shipwright-perl-wrapper' ) {
         copy( catfile( 'etc', $_ ),
@@ -284,8 +284,8 @@
         chdir $build_base;
     }
 
-    mkdir catfile( $args{'install-base'},       'bin' )
-      unless -e catfile( $args{'install-base'}, 'bin' );
+    mkdir catdir( $args{'install-base'},       'bin' )
+      unless -e catdir( $args{'install-base'}, 'bin' );
 
     wrap_bin($log);
     print "install finished, the dists are at $args{'install-base'}\n";
@@ -296,8 +296,8 @@
     my $dir = shift;
     my $log = shift;
 
-    if ( $args{with}{$dir} && -e catfile( 'tmp_dists', $dir ) ) {
-        chdir catfile( 'tmp_dists', $dir );
+    if ( $args{with}{$dir} && -e catdir( 'tmp_dists', $dir ) ) {
+        chdir catdir( 'tmp_dists', $dir );
     }
     else {
         if ($branches) {
@@ -394,8 +394,8 @@
         }
 
         my $dir = ( splitdir($File::Find::dir) )[-1];
-        mkdir catfile( $args{'install-base'},       "$dir-wrapped" )
-          unless -d catfile( $args{'install-base'}, "$dir-wrapped" );
+        mkdir catdir( $args{'install-base'},       "$dir-wrapped" )
+          unless -d catdir( $args{'install-base'}, "$dir-wrapped" );
 
         if ( -e catfile( $args{'install-base'}, "$dir-wrapped", $file ) ) {
             print $log 'found old '
@@ -419,7 +419,7 @@
             }
         }
 
-        move( $file => catfile( $args{'install-base'}, "$dir-wrapped" ) )
+        move( $file => catdir( $args{'install-base'}, "$dir-wrapped" ) )
           or confess $!;
 
     # if we have this $type(e.g. perl) installed and have that specific wrapper,
@@ -441,7 +441,7 @@
 
     my @dirs =
       grep { -d $_ }
-      map { catfile( $args{'install-base'}, $_ ) } qw/bin sbin/;
+      map { catdir( $args{'install-base'}, $_ ) } qw/bin sbin/;
     find( $sub, @dirs ) if @dirs;
 
 }
@@ -543,7 +543,7 @@
     my $log = shift;
 
     my $cmd;
-    chdir catfile( 'dists', $dir );
+    chdir catdir( 'dists', $dir );
 
     if ( -e catfile( '..', '..', 'scripts', $dir, 'build.pl' ) ) {
         print $log "found build.pl for $dir, will clean $dir using that\n";



More information about the Bps-public-commit mailing list