[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. 968647040f6a292d164ea095e79b73c9ae6cdb37

jesse jesse at bestpractical.com
Mon Feb 9 21:48:59 EST 2009


The branch, master has been updated
       via  968647040f6a292d164ea095e79b73c9ae6cdb37 (commit)
      from  84756ab85e5502a19da128ba098f8634667b6ea9 (commit)

Summary of changes:
 lib/App/SD/CLI/Command/Attachment/Create.pm        |    3 ++-
 lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm |    3 ++-
 lib/App/SD/CLI/Command/Ticket/Comment/Create.pm    |    5 +++--
 lib/App/SD/CLI/Command/Ticket/Search.pm            |    5 +++--
 lib/App/SD/Config.pm                               |    5 +++--
 lib/App/SD/Model/Comment.pm                        |    2 +-
 6 files changed, 14 insertions(+), 9 deletions(-)

- Log -----------------------------------------------------------------
commit 968647040f6a292d164ea095e79b73c9ae6cdb37
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Feb 9 21:48:35 2009 -0500

    Removed Class::Method::Modifiers to cut down on deps

diff --git a/lib/App/SD/CLI/Command/Attachment/Create.pm b/lib/App/SD/CLI/Command/Attachment/Create.pm
index cc3ecf6..fc4cd0e 100644
--- a/lib/App/SD/CLI/Command/Attachment/Create.pm
+++ b/lib/App/SD/CLI/Command/Attachment/Create.pm
@@ -4,7 +4,7 @@ extends 'Prophet::CLI::Command::Create';
 with 'App::SD::CLI::Model::Attachment';
 with 'App::SD::CLI::Command';
 
-before run => sub {
+sub run {
     my $self = shift;
 
     my $content = $self->get_content(type => 'attachment');
@@ -13,6 +13,7 @@ before run => sub {
         if length($content) == 0;
 
     $self->set_prop(content => $content);
+    $self->SUPER::run(@_);
 };
 
 __PACKAGE__->meta->make_immutable;
diff --git a/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm b/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
index 780987c..2530dba 100644
--- a/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
@@ -5,11 +5,12 @@ extends 'App::SD::CLI::Command::Attachment::Create';
 __PACKAGE__->register_arg_translations( f => 'file' );
 
 # override args to feed in that ticket's uuid as an argument to the comment
-before run => sub {
+sub run {
     my $self = shift;
     $self->require_uuid;
 
     $self->set_prop(ticket => $self->uuid);
+    $self->SUPER::run(@_);
 };
 
 __PACKAGE__->meta->make_immutable;
diff --git a/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm b/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
index e837333..1ef2d0c 100644
--- a/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
@@ -8,7 +8,7 @@ with 'App::SD::CLI::Command';
 __PACKAGE__->register_arg_translations( f => 'file', m => 'content' );
 
 # override args to feed in that ticket's uuid as an argument to the comment
-before run => sub {
+sub run {
     my $self = shift;
     $self->require_uuid;
 
@@ -19,7 +19,8 @@ before run => sub {
 
     $self->set_prop(ticket => $self->uuid);
     $self->set_prop(content => $content);
-};
+    $self->SUPER::run(@_);
+}
 
 __PACKAGE__->meta->make_immutable;
 no Any::Moose;
diff --git a/lib/App/SD/CLI/Command/Ticket/Search.pm b/lib/App/SD/CLI/Command/Ticket/Search.pm
index 441e437..ae3998f 100644
--- a/lib/App/SD/CLI/Command/Ticket/Search.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Search.pm
@@ -6,7 +6,7 @@ with 'App::SD::CLI::Command';
 __PACKAGE__->register_arg_translations( s => 'sort', g => 'group' );
 
 # frob the sort routine before running prophet's search command
-before run => sub {
+sub run {
     my $self = shift;
 
     if (  (!$self->has_arg('sort') || !$self->arg('sort'))
@@ -71,7 +71,8 @@ before run => sub {
             }
         );
     }
-};
+    $self->SUPER::run(@_);
+}
 
 # implicit status != closed
 sub default_match {
diff --git a/lib/App/SD/Config.pm b/lib/App/SD/Config.pm
index f768cd3..1188e8d 100644
--- a/lib/App/SD/Config.pm
+++ b/lib/App/SD/Config.pm
@@ -8,7 +8,7 @@ extends 'Prophet::Config';
 # with $ENV{PROPHET_REPO} because we need to instantiate App::SD::CLI to
 # get the location of the repo root, and then Prophet would load its own
 # config file before we got around to messing with the env var
-before 'app_config_file' => sub {
+sub app_config_file {
     my $self = shift;
 
     # The order of preference for config files is:
@@ -26,7 +26,8 @@ before 'app_config_file' => sub {
                 File::Spec->catfile($ENV{'HOME'}.'/.sdrc'))
             || $ENV{'PROPHET_APP_CONFIG'} # don't overwrite with nothing
             || ''; # don't write undef
-};
+        $self->SUPER::app_config_file(@_);
+}
 
 __PACKAGE__->meta->make_immutable;
 no Any::Moose;
diff --git a/lib/App/SD/Model/Comment.pm b/lib/App/SD/Model/Comment.pm
index 85e6c1e..6c4c0f0 100644
--- a/lib/App/SD/Model/Comment.pm
+++ b/lib/App/SD/Model/Comment.pm
@@ -8,7 +8,7 @@ has type => ( default => 'comment');
 
 sub _default_summary_format { '%s,$uuid | %s,content'}
 
-around declared_props => sub { shift->(@_), 'content' };
+sub declared_props { return ('content', shift->SUPER::declared_props(@_)) }
 
 sub canonicalize_props {
     my $self = shift;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list