[Bps-public-commit] r13961 - in sd/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Jul 10 16:06:42 EDT 2008


Author: sartak
Date: Thu Jul 10 16:06:33 2008
New Revision: 13961

Modified:
   sd/trunk/   (props changed)
   sd/trunk/lib/App/SD/CLI/Command/Pull.pm
   sd/trunk/lib/App/SD/CLI/Command/Push.pm

Log:
 r64072 at onn:  sartak | 2008-07-10 16:06:26 -0400
 Finish fixing Pull and Push to be more Moosey


Modified: sd/trunk/lib/App/SD/CLI/Command/Pull.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Pull.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Pull.pm	Thu Jul 10 16:06:33 2008
@@ -5,7 +5,7 @@
 override run => sub {
     my $self = shift;
 
-    die "Please specify a --from.\n" if !defined($self->args->{'from'});
+    die "Please specify a --from.\n" if !$self->has_arg('from');
 
     local $ENV{PROPHET_RESOLVER} = 'Prompt';
 

Modified: sd/trunk/lib/App/SD/CLI/Command/Push.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Push.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Push.pm	Thu Jul 10 16:06:33 2008
@@ -2,13 +2,17 @@
 use Moose;
 extends qw/App::SD::CLI::Command::Merge/;
 
-sub run {
+override run => sub {
     my $self = shift;
+
+    die "Please specify a --to.\n" if !$self->has_arg('to');
+
     local $ENV{PROPHET_RESOLVER} = 'Prompt';
-    bless $self, 'App::SD::CLI::Command::Merge';
-    $self->args( {to => $self->args->{'to'}, from => $self->app_handle->default_replica_type.":file://".$self->app_handle->handle->fs_root });
-    $self->run;
-}
+
+    $self->set_arg(from => $self->app_handle->default_replica_type.":file://".$self->app_handle->handle->fs_root);
+
+    super();
+};
 
 __PACKAGE__->meta->make_immutable;
 no Moose;



More information about the Bps-public-commit mailing list