restarting engine fixes from willert
[catagits/Catalyst-Devel.git] / lib / Catalyst / Helper.pm
index 835c061..055e5ec 100644 (file)
@@ -861,6 +861,7 @@ my $restart           = $ENV{[% appenv %]_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
 my $restart_delay     = 1;
 my $restart_regex     = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.pm)$';
 my $restart_directory = undef;
+my $follow_symlinks   = 0;
 
 my @argv = @ARGV;
 
@@ -874,7 +875,8 @@ GetOptions(
     'restart|r'           => \$restart,
     'restartdelay|rd=s'   => \$restart_delay,
     'restartregex|rr=s'   => \$restart_regex,
-    'restartdirectory=s'  => \$restart_directory,
+    'restartdirectory=s@' => \$restart_directory,
+    'followsymlinks'      => \$follow_symlinks,
 );
 
 pod2usage(1) if $help;
@@ -898,6 +900,7 @@ require [% name %];
     restart_delay     => $restart_delay,
     restart_regex     => qr/$restart_regex/,
     restart_directory => $restart_directory,
+    follow_symlinks   => $follow_symlinks,
 } );
 
 1;
@@ -925,9 +928,10 @@ require [% name %];
                       a restart when modified
                       (defaults to '\.yml$|\.yaml$|\.pm$')
    -restartdirectory  the directory to search for
-                      modified files
-                      (defaults to '../')
-
+                      modified files, can be set mulitple times
+                      (defaults to '[SCRIPT_DIR]/..')
+   -follow_symlinks   follow symlinks in search directories
+                      (defaults to false. this is a no-op on Win32)
  See also:
    perldoc Catalyst::Manual
    perldoc Catalyst::Manual::Intro