I don't get why the test app doesn't trigger this but my app does, so I fix
Tomas Doran [Sun, 15 Feb 2009 10:11:34 +0000 (10:11 +0000)]
Changes
lib/Catalyst/Engine/HTTP/Restarter.pm

diff --git a/Changes b/Changes
index 17f7b7a..f5d21d8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+        - Make MyApp.pm restartable by unsetting setup_finished in
+          the restarter process (t0m)
         - Non-naive implementation of making mutable on restart using
           B::Hooks::OP::Check::StashChange if installed (t0m)
           - Tests for this (t0m)
index 0fffaf0..8927453 100644 (file)
@@ -20,9 +20,11 @@ around run => sub {
         close STDIN;
         close STDOUT;
 
+        # Avoid "Setting config after setup" error restarting MyApp.pm
+        $class->setup_finished(0);
         # Best effort if we can't trap compiles..
         $self->_make_components_mutable($class)
-            if !Catalyst::Engine::HTTP::Restarter::Watcher::DETECT_PACKAGE_COMPILATION();
+            if !Catalyst::Engine::HTTP::Restarter::Watcher::DETECT_PACKAGE_COMPILATION;
 
         my $watcher = Catalyst::Engine::HTTP::Restarter::Watcher->new(
             directory => (