[Bps-public-commit] r10201 - bpsbuilder/BPB/lib/BPB/Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Dec 30 11:47:16 EST 2007


Author: sunnavy
Date: Sun Dec 30 11:47:15 2007
New Revision: 10201

Modified:
   bpsbuilder/BPB/lib/BPB/Script/Import.pm

Log:
added source-name arg for import cli

Modified: bpsbuilder/BPB/lib/BPB/Script/Import.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Import.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Script/Import.pm	Sun Dec 30 11:47:15 2007
@@ -6,7 +6,9 @@
 
 use base qw/App::CLI::Command Class::Accessor::Fast/;
 __PACKAGE__->mk_accessors(
-    qw/config name comment source no_follow build_script require_yml/);
+    qw/config name comment source no_follow build_script require_yml
+      source_name/
+);
 
 use BPB;
 use File::Spec;
@@ -20,6 +22,7 @@
         'n|name=s'       => 'name',
         'm|comment=s'    => 'comment',
         's|source=s'     => 'source',
+        'source-name=s'  => 'source_name',
         'no-follow'      => 'no_follow',
         'build-script=s' => 'build_script',
         'require-yml=s'  => 'require_yml',
@@ -39,10 +42,11 @@
     }
 
     my $bpb = BPB->new(
-        config => $self->config,
-        name   => $self->name,
-        source => $self->source,
-        follow => !$self->no_follow,
+        config      => $self->config,
+        name        => $self->name,
+        source      => $self->source,
+        source_name => $self->source_name,
+        follow      => !$self->no_follow,
     );
 
     $self->source( $bpb->source->run( '__require.yml' => $self->require_yml ) );
@@ -64,7 +68,6 @@
         File::Spec->catfile( $script_dir,   'require.yml' )
     );
 
-
     $bpb->backend->import( map { $_, $self->$_ } qw/comment source/ );
     $bpb->backend->import(
         source       => $self->source,



More information about the Bps-public-commit mailing list