[Bps-public-commit] r10745 - in Shipwright/lib/Shipwright: Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Feb 6 20:04:19 EST 2008


Author: sunnavy
Date: Wed Feb  6 20:04:17 2008
New Revision: 10745

Modified:
   Shipwright/lib/Shipwright/Script/Import.pm
   Shipwright/lib/Shipwright/Source/Base.pm

Log:
rename source-name arg to name, also move default min_perl_version set part to Source/Base.pm 

Modified: Shipwright/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/lib/Shipwright/Script/Import.pm	(original)
+++ Shipwright/lib/Shipwright/Script/Import.pm	Wed Feb  6 20:04:17 2008
@@ -7,7 +7,7 @@
 use base qw/App::CLI::Command Class::Accessor::Fast/;
 __PACKAGE__->mk_accessors(
     qw/repository log_level comment source follow build_script require_yml
-      source_name test_script extra_tests overwrite min_perl_version skip/
+      name test_script extra_tests overwrite min_perl_version skip/
 );
 
 use Shipwright;
@@ -26,7 +26,7 @@
         'l|log-level=s'    => 'log_level',
         'm|comment=s'      => 'comment',
         's|source=s'       => 'source',
-        'source-name=s'    => 'source_name',
+        'name=s'           => 'name',
         'follow=s'         => 'follow',
         'build-script=s'   => 'build_script',
         'require-yml=s'    => 'require_yml',
@@ -55,19 +55,11 @@
         die "need $_ arg" unless $self->$_();
     }
 
-    unless ( $self->min_perl_version ) {
-        no warnings 'once';
-        require Config;
-        require version;
-        my $version = version->new( $Config::Config{version} );
-        $self->min_perl_version( $version->numify );
-    }
-
     my $shipwright = Shipwright->new(
         repository       => $self->repository,
         log_level        => $self->log_level,
         source           => $self->source,
-        source_name      => $self->source_name,
+        name             => $self->name,
         follow           => $self->follow,
         min_perl_version => $self->min_perl_version,
         skip             => $self->skip,
@@ -276,8 +268,8 @@
    --log-level(-l)    specify the log level
    --comment(-m)      specify the comment
    --source(-s)       specify the source path
+   --name             specify the sorce name
    --build-script     specify the build script
-   --source-name      specify the sorce name
    --require-yml      specify the require.yml
    --follow           follow the dependent chain or not
    --extra-test       specify the extra test source(for --only-test when build)

Modified: Shipwright/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/lib/Shipwright/Source/Base.pm	Wed Feb  6 20:04:17 2008
@@ -47,6 +47,15 @@
     my $require_path = File::Spec->catfile( $path, '__require.yml' );
     my $map          = {};
 
+    
+    unless ( $self->min_perl_version ) {
+        no warnings 'once';
+        require Config;
+        require version;
+        my $version = version->new( $Config::Config{version} );
+        $self->min_perl_version( $version->numify );
+    }
+
     if ( -e $self->map_path ) {
         $map = Shipwright::Util::LoadFile( $self->map_path );
     }



More information about the Bps-public-commit mailing list