[Rt-commit] rt branch, 4.4/extend-execmodule-support, repushed

Wallace Reis wreis at bestpractical.com
Wed Jul 2 13:32:41 EDT 2014


The branch 4.4/extend-execmodule-support was deleted and repushed:
       was 80d4e5de00fb670b4097b63028a349f34b88b1bf
       now ebb3c9143cfbdcd51c26a5544c863f8feebd9e17

1:  80d4e5d ! 1:  ebb3c91 Allow deep namespaces for ScripActions and Conditions
    @@ -13,7 +13,7 @@
      
      use strict;
      use warnings;
    -+use Module::Runtime 'use_module';
    ++use UNIVERSAL::require;
      
      use base 'RT::Record';
      
    @@ -24,16 +24,14 @@
     -    $self->ExecModule =~ /^(\w+)$/;
     -    my $module = $1;
     -    my $type = "RT::Action::". $module;
    +-
    +-    eval "require $type" || die "Require of $type failed.\n$@\n";
     +    my $module = $self->ExecModule;
     +    my $type = 'RT::Action::' . $module;
    ++    $type->require or die "Could not find Action class: $@";
      
    --    eval "require $type" || die "Require of $type failed.\n$@\n";
    --
    --    return $self->{'Action'} = $type->new(
    -+    return $self->{'Action'} = use_module($type)->new(
    +     return $self->{'Action'} = $type->new(
              %args,
    -         Argument       => $self->Argument,
    -         CurrentUser    => $self->CurrentUser,
     
     diff --git a/lib/RT/ScripCondition.pm b/lib/RT/ScripCondition.pm
     --- a/lib/RT/ScripCondition.pm
    @@ -43,7 +41,7 @@
      use strict;
      use warnings;
     -
    -+use Module::Runtime 'use_module';
    ++use UNIVERSAL::require;
      
      use base 'RT::Record';
      
    @@ -74,8 +72,9 @@
     -                                       );
     +    my $module = $self->ExecModule;
     +    my $type = 'RT::Condition::' . $module;
    ++    $type->require or die "Could not find Condition class: $@";
     +
    -+    return $self->{'Condition'} = use_module($type)->new(
    ++    return $self->{'Condition'} = $type->new(
     +        ScripConditionObj => $self,
     +        TicketObj => $args{'TicketObj'},
     +        ScripObj => $args{'ScripObj'},
    @@ -87,18 +86,6 @@
      }
      
      
    -
    -diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
    ---- a/sbin/rt-test-dependencies.in
    -+++ b/sbin/rt-test-dependencies.in
    -@@
    - Mail::Mailer 1.57
    - MIME::Entity 5.504
    - Module::Refresh 0.03
    -+Module::Runtime
    - Module::Versions::Report 1.05
    - Net::CIDR
    - Plack 1.0002
     
     diff --git a/t/api/scrip_execmodule.t b/t/api/scrip_execmodule.t
     new file mode 100644



More information about the rt-commit mailing list