[Catalyst-dev] restart_directory override in HTTP engine

Aran Deltac aran at arandeltac.com
Tue May 16 19:32:52 CEST 2006


I'd like to be able to specify the directory that HTTP::Restarter
searches for changed files in.  See the below patch.  I don't have
commit bits for catalyst, so if its approved, could someone commit
this for me?

Aran


Index: lib/Catalyst/Engine/HTTP/Restarter.pm
===================================================================
--- lib/Catalyst/Engine/HTTP/Restarter.pm       (revision 4147)
+++ lib/Catalyst/Engine/HTTP/Restarter.pm       (working copy)
@@ -19,7 +19,10 @@
         close STDOUT;

         my $watcher = Catalyst::Engine::HTTP::Restarter::Watcher->new(
-            directory => File::Spec->catdir( $FindBin::Bin, '..' ),
+            directory => (
+                $options->{restart_directory} ||
+                File::Spec->catdir( $FindBin::Bin, '..' )
+            ),
             regex     => $options->{restart_regex},
             delay     => $options->{restart_delay},
         );



More information about the Catalyst-dev mailing list