Make all Restarter subclasses immutable
[catagits/Catalyst-Devel.git] / lib / Catalyst / Restarter / Win32.pm
index 65a8e3e..d0f43a1 100644 (file)
@@ -16,7 +16,7 @@ sub _fork_and_start {
 
     # This is totally hack-tastic, and is probably much slower, but it
     # does seem to work.
-    my @command = ( $^X, $0, grep { ! /^\-r/ } @{ $self->argv } );
+    my @command = ( $^X, map("-I$_", @INC), $0, grep { ! /^\-r/ } @{ $self->argv } );
 
     my $child = Proc::Background->new(@command);
 
@@ -31,6 +31,8 @@ sub _kill_child {
     $self->_child->die;
 }
 
+__PACKAGE__->meta->make_immutable;
+
 1;
 
 __END__