[Rt-commit] rt branch, master, updated. rt-4.0.0rc7-243-g962f5fc

Shawn Moore sartak at bestpractical.com
Tue Mar 22 17:30:57 EDT 2011


The branch, master has been updated
       via  962f5fcd084b82989c4a350fb3d60c10be8fc589 (commit)
      from  1319c6e0bcc3619132769a94c6bc0d11cbd02070 (commit)

Summary of changes:
 lib/RT.pm               |    2 --
 lib/RT/Interface/Web.pm |    6 ++++--
 lib/RT/Test.pm          |    2 ++
 sbin/rt-server.in       |    1 +
 4 files changed, 7 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 962f5fcd084b82989c4a350fb3d60c10be8fc589
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Mar 22 17:29:57 2011 -0400

    Revert "Move loading and calling of Module::Refresh to only one codepath"
    
    This reverts commit 5692ee78152d3d891a60ca1769a8fd45861bcc2e.
    
    This branch is not ready yet; it needs JS cache fixes

diff --git a/lib/RT.pm b/lib/RT.pm
index 662b653..c6b6668 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -125,8 +125,6 @@ sub LoadConfig {
         $gpgopts->{homedir} = File::Spec->catfile( $BasePath, $gpgopts->{homedir} );
     }
 
-    require Module::Refresh if RT->Config->Get('DevelMode');
-
     return $Config;
 }
 
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 5ef37d6..1d925f7 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -189,8 +189,10 @@ sub WebExternalAutoInfo {
 sub HandleRequest {
     my $ARGS = shift;
 
-    Module::Refresh->refresh
-          if RT->Config->Get('DevelMode');
+    if (RT->Config->Get('DevelMode')) {
+        require Module::Refresh;
+        Module::Refresh->refresh;
+    }
 
     $HTML::Mason::Commands::r->content_type("text/html; charset=utf-8");
 
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 5b8864e..017f363 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -145,6 +145,8 @@ sub import {
 
     RT::LoadConfig;
 
+    if (RT->Config->Get('DevelMode')) { require Module::Refresh; }
+
     $class->bootstrap_db( %args );
 
     RT::InitPluginPaths();
diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index 1a740fe..022559b 100755
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) {
 
 require RT;
 RT->LoadConfig();
+require Module::Refresh if RT->Config->Get('DevelMode');
 
 require RT::Handle;
 my ($integrity, $state, $msg) = RT::Handle->CheckIntegrity;

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


More information about the Rt-commit mailing list