[Bps-public-commit] r9786 - in bpsbuilder/BPB/lib: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Dec 2 10:56:12 EST 2007


Author: sunnavy
Date: Sun Dec  2 10:56:08 2007
New Revision: 9786

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

Log:
initialize BPB's source stuff in Script/Source.pm

Modified: bpsbuilder/BPB/lib/BPB.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB.pm	(original)
+++ bpsbuilder/BPB/lib/BPB.pm	Sun Dec  2 10:56:08 2007
@@ -39,8 +39,6 @@
     );
     $self->backend(
         BPB::Backend->new( %{ $self->config->moniker->{backend} }, ) );
-    $self->source( BPB::Source->new( %{ $self->config->moniker->{source}},
-                %args ) );
 
     return $self;
 }

Modified: bpsbuilder/BPB/lib/BPB/Script/Source.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Source.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Script/Source.pm	Sun Dec  2 10:56:08 2007
@@ -10,15 +10,15 @@
 use BPB;
 
 sub options {
-    ( 'c|config=s' => 'config',
-      'k|moniker=s' => 'moniker',
-      't|type=s' => 'type',
-      's|source=s' => 'source',
-      'd|directory=s' => 'directory',
-    )
+    (
+        'c|config=s'    => 'config',
+        'k|moniker=s'   => 'moniker',
+        't|type=s'      => 'type',
+        's|source=s'    => 'source',
+        'd|directory=s' => 'directory',
+    );
 }
 
-
 sub run {
     my $self = shift;
     my %args;
@@ -26,12 +26,13 @@
     for ( values %options ) {
         $args{$_} = $self->$_ if $self->$_;
     }
-    $args{source} ||= shift; 
-    my $bpb = BPB->new( %args );
+    $args{source} ||= shift;
+    my $bpb = BPB->new(%args);
+    $bpb->source(
+        BPB::Source->new( %{ $bpb->config->moniker->{source} }, %args ) );
     $bpb->source->run;
 }
 
-
 1;
 
 __END__



More information about the Bps-public-commit mailing list