[Rt-commit] rt branch, 4.2/centralize-develmode, created. rt-4.0.0rc6-171-g5692ee7
Alex Vandiver
alexmv at bestpractical.com
Mon Mar 21 19:41:11 EDT 2011
The branch, 4.2/centralize-develmode has been created
at 5692ee78152d3d891a60ca1769a8fd45861bcc2e (commit)
- Log -----------------------------------------------------------------
commit 5692ee78152d3d891a60ca1769a8fd45861bcc2e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Mar 21 00:18:49 2011 -0400
Move loading and calling of Module::Refresh to only one codepath
diff --git a/lib/RT.pm b/lib/RT.pm
index c6b6668..662b653 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -125,6 +125,8 @@ 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 63d4302..c02166f 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -188,10 +188,8 @@ sub WebExternalAutoInfo {
sub HandleRequest {
my $ARGS = shift;
- if (RT->Config->Get('DevelMode')) {
- require Module::Refresh;
- Module::Refresh->refresh;
- }
+ Module::Refresh->refresh
+ if RT->Config->Get('DevelMode');
$HTML::Mason::Commands::r->content_type("text/html; charset=utf-8");
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index d948725..7e023f2 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -138,8 +138,6 @@ 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 aa5e0d8..2be87a1 100755
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -91,7 +91,6 @@ 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