[Bps-public-commit] r13945 - in sd/trunk: . lib/App/SD/CLI/Command/Attachment lib/App/SD/CLI/Command/Ticket/Comment

sartak at bestpractical.com sartak at bestpractical.com
Thu Jul 10 12:08:56 EDT 2008


Author: sartak
Date: Thu Jul 10 12:08:55 2008
New Revision: 13945

Modified:
   sd/trunk/   (props changed)
   sd/trunk/lib/App/SD/CLI/Command/Attachment/Create.pm
   sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
   sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Search.pm
   sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm

Log:
 r64036 at onn:  sartak | 2008-07-10 12:08:51 -0400
 Use the "before" method modifier instead of explicit override/super


Modified: sd/trunk/lib/App/SD/CLI/Command/Attachment/Create.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Attachment/Create.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Attachment/Create.pm	Thu Jul 10 12:08:55 2008
@@ -4,11 +4,9 @@
 with 'App::SD::CLI::Model::Attachment';
 with 'App::SD::CLI::Command';
 
-override run => sub {
+before run => sub {
     my $self = shift;
     $self->args->{'content'} = $self->get_content('attachment');
-    super(@_);
-
 };
 
 __PACKAGE__->meta->make_immutable;

Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm	Thu Jul 10 12:08:55 2008
@@ -3,10 +3,9 @@
 extends 'App::SD::CLI::Command::Attachment::Create';
 # override args to feed in that ticket's uuid as an argument to the comment
 
-override run => sub  {
+before run => sub {
     my $self = shift;
     $self->args->{'ticket'} = $self->cli->uuid;
-    super(@_);
 };
 
 __PACKAGE__->meta->make_immutable;

Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Search.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Search.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Search.pm	Thu Jul 10 12:08:55 2008
@@ -11,8 +11,7 @@
     my $self = shift;
     return sub {
         shift->prop('ticket') eq $self->uuid ? 1 : 0;
-        }
-
+    }
 }
 
 __PACKAGE__->meta->make_immutable;

Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm	Thu Jul 10 12:08:55 2008
@@ -6,11 +6,10 @@
 with 'App::SD::CLI::Command';
 
 # override args to feed in that ticket's uuid as an argument to the comment
-override run => sub {
+before run => sub {
     my $self = shift;
     $self->args->{'ticket'} = $self->cli->uuid;
     $self->args->{'content'} = $self->get_content('comment');
-    super(@_);
 };
 
 __PACKAGE__->meta->make_immutable;



More information about the Bps-public-commit mailing list