[Bps-public-commit] r10799 - Shipwright/lib/Shipwright/Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Feb 11 08:02:08 EST 2008


Author: sunnavy
Date: Mon Feb 11 08:00:39 2008
New Revision: 10799

Modified:
   Shipwright/lib/Shipwright/Script/Update.pm

Log:
cleaned up a bit

Modified: Shipwright/lib/Shipwright/Script/Update.pm
==============================================================================
--- Shipwright/lib/Shipwright/Script/Update.pm	(original)
+++ Shipwright/lib/Shipwright/Script/Update.pm	Mon Feb 11 08:00:39 2008
@@ -62,19 +62,19 @@
             update($_);
         }
     }
-    elsif ( $self->follow ) {
+    else {
         if ( !$source->{$name} && $map->{$name} ) {
-            $self->name( $map->{$name} );  # in case the name is module name
+            $self->name( $map->{$name} );    # in case the name is module name
         }
 
-        my @dists = find_deps( $self->name );
+        my @dists;
+        if ( $self->follow ) {
+            @dists = find_deps( $self->name );
+        }
         for ( @dists, $self->name ) {
             update($_);
         }
     }
-    else {
-        update( $self->name );
-    }
 }
 
 =head2 update
@@ -139,11 +139,11 @@
 
     return if $found{$name}++;
 
-    my ($require) = $shipwright->backend->require( $name );
+    my ($require) = $shipwright->backend->require($name);
     my @deps;
     for my $type (qw/requires build_requires recommends/) {
-        for ( keys %{$require->{$type}} ) {
-            push @deps, find_deps( $_ ), $_;
+        for ( keys %{ $require->{$type} } ) {
+            push @deps, find_deps($_), $_;
         }
     }
     return uniq @deps;
@@ -166,6 +166,7 @@
    --log-level(-l)    specify the log level
    --name             specify the source name( only alphanumeric characters and - )
    --all              update all the dists
+   --follow           update one dist with all its deps(recursively)
 
 =head1 AUTHOR
 



More information about the Bps-public-commit mailing list