Commit 024e596a authored by Audrey Tang's avatar Audrey Tang
Browse files

Module::Refresh is now enabled by default for all HTTPD handlers

  when $RT::DevelMode is set to true.

git-svn-id: svn+ssh://svn.bestpractical.com/svn/bps-public/rt/branches/3.3-TESTING@1796 e417ac7c-1bcc-0310-8ffa-8f5827389a85
parent dfa58937
......@@ -49,13 +49,13 @@ package RT::Mason;
use strict;
use vars '$Handler';
require ('@RT_BIN_PATH@/webmux.pl');
BEGIN { require ('@RT_BIN_PATH@/webmux.pl') };
use lib( "@LOCAL_LIB_PATH@", "@RT_LIB_PATH@");
use Socket;
$SIG{CHLD} = "IGNORE"; # reap child processes
$SIG{CHLD} = 'IGNORE'; # reap child processes
$SIG{HUP} = sub {
# on a "kill -HUP", we first close our socket handles.
close Remote;
......@@ -97,7 +97,7 @@ sub main_loop {
while (1) {
for ( ; accept( Remote, HTTPDaemon ); close Remote ) {
Module::Refresh->refresh if $RT::DevelMode;
*STDIN = *Remote;
*STDOUT = *Remote;
......
......@@ -73,7 +73,10 @@ use HTML::Mason; # brings in subpackages: Parser, Interp, etc.
use vars qw($Nobody $SystemUser $Handler $r);
#This drags in RT's config.pm
RT::LoadConfig();
BEGIN {
RT::LoadConfig();
if ($RT::DevelMode) { require Module::Refresh; }
}
use Carp;
......@@ -101,8 +104,6 @@ sub handler {
local $SIG{__WARN__};
local $SIG{__DIE__};
RT::Init();
# We don't need to handle non-text, non-xml items
if ($r->content_type =~ m/^httpd\b.*\bdirectory/i) {
use File::Spec::Unix;
......@@ -113,6 +114,9 @@ sub handler {
$r->content_type =~ m!(^text/|\bxml\b)!i or return -1;
}
Module::Refresh->refresh if $RT::DevelMode;
RT::Init();
my %session;
my $status;
......
......@@ -63,6 +63,9 @@ ok(require RT::ACE);
=cut
package RT::ACE;
use strict;
no warnings qw(redefine);
use RT::Principals;
......
......@@ -65,6 +65,9 @@ ok(require RT::ACL);
=cut
package RT::ACL;
use strict;
no warnings qw(redefine);
......
......@@ -66,6 +66,9 @@ ok (require RT::Attachment);
=cut
package RT::Attachment;
use strict;
no warnings qw(redefine);
......
......@@ -68,6 +68,9 @@ ok (require RT::Attachments);
=cut
package RT::Attachments;
use strict;
no warnings qw(redefine);
......
......@@ -43,6 +43,9 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
package RT::Attribute;
use strict;
no warnings qw(redefine);
use Storable qw/nfreeze thaw/;
......
......@@ -81,6 +81,9 @@ is ($names[0] , 'TestAttr');
=cut
package RT::Attributes;
use strict;
no warnings qw(redefine);
......
......@@ -43,6 +43,9 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
package RT::CachedGroupMember;
use strict;
no warnings qw(redefine);
......
......@@ -65,6 +65,9 @@ ok (require RT::CachedGroupMembers);
=cut
package RT::CachedGroupMembers;
use strict;
no warnings qw(redefine);
......
......@@ -43,6 +43,9 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
package RT::CustomFieldValues;
use strict;
no warnings qw(redefine);
......
......@@ -43,6 +43,9 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
package RT::CustomField;
use strict;
no warnings qw(redefine);
......
......@@ -64,6 +64,9 @@ ok (require RT::CustomFields);
=cut
package RT::CustomFields;
use strict;
no warnings qw(redefine);
......
......@@ -72,6 +72,9 @@ ok (require RT::GroupMember);
=cut
package RT::GroupMember;
use strict;
no warnings qw(redefine);
use RT::CachedGroupMembers;
......
......@@ -65,6 +65,9 @@ ok (require RT::GroupMembers);
=cut
package RT::GroupMembers;
use strict;
no warnings qw(redefine);
......
......@@ -154,6 +154,9 @@ ok($group_3->HasMemberRecursively($principal_2) == undef, "group 3 has member 2
=cut
package RT::Group;
use strict;
no warnings qw(redefine);
......
......@@ -70,6 +70,9 @@ ok (require RT::Groups);
=cut
package RT::Groups;
use strict;
no warnings qw(redefine);
......
......@@ -76,6 +76,9 @@ ok (UNIVERSAL::isa($link, 'DBIx::SearchBuilder::Record'));
=cut
package RT::Link;
use strict;
no warnings qw(redefine);
......
......@@ -66,6 +66,9 @@ ok (require RT::Links);
=cut
package RT::Links;
use strict;
no warnings qw(redefine);
use RT::URI;
......
......@@ -43,6 +43,9 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
package RT::ObjectCustomFieldValue;
use strict;
no warnings qw(redefine);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment