[Bps-public-commit] r15204 - in Shipwright/trunk: lib/Shipwright/Backend

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Aug 18 03:39:58 EDT 2008


Author: sunnavy
Date: Mon Aug 18 03:39:57 2008
New Revision: 15204

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Backend/Base.pm

Log:
 r15729 at sunnavys-mb:  sunnavy | 2008-08-18 00:07:46 +0800
 refactor: do not keep YAML::Tiny in the share root of Shipwright


Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm	Mon Aug 18 03:39:57 2008
@@ -8,6 +8,7 @@
 use File::Temp qw/tempdir/;
 use File::Copy qw/copy/;
 use File::Copy::Recursive qw/dircopy/;
+use File::Path;
 use List::MoreUtils qw/uniq/;
 
 our %REQUIRE_OPTIONS = ( import => [qw/source/] );
@@ -60,6 +61,13 @@
 
     dircopy( Shipwright::Util->share_root, $dir );
 
+    # copy YAML/Tiny.pm to inc/
+    my $yaml_tiny_path = catfile( $dir, 'inc', 'YAML' );
+    mkpath $yaml_tiny_path or die "mkpath $yaml_tiny_path failed: $!";
+    require Module::Info;
+    copy( Module::Info->new_from_module('YAML::Tiny')->file, $yaml_tiny_path )
+      or die "copy YAML/Tiny.pm failed: $!";
+
     # share_root can't keep empty dirs, we have to create them manually
     for (qw/scripts t sources/) {
         mkdir catfile( $dir, $_ );



More information about the Bps-public-commit mailing list