From: Yuval Kogman Date: Wed, 13 Sep 2006 13:02:56 +0000 (+0000) Subject: kane++'s fix for passing @INC down to the restarter child X-Git-Tag: 5.7099_04~352 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=e37e397712a443ae02f23cee03f6ba4ddda5bf64 kane++'s fix for passing @INC down to the restarter child --- diff --git a/lib/Catalyst/Engine/HTTP.pm b/lib/Catalyst/Engine/HTTP.pm index 60a166d..afc2603 100644 --- a/lib/Catalyst/Engine/HTTP.pm +++ b/lib/Catalyst/Engine/HTTP.pm @@ -199,6 +199,13 @@ sub run { if ($restart) { $SIG{CHLD} = 'DEFAULT'; wait; + + ### if the standalone server was invoked with perl -I .. we will loose + ### those include dirs upon re-exec. So add them to PERL5LIB, so they + ### are available again for the exec'ed process --kane + use Config; + $ENV{PERL5LIB} .= join $Config{path_sep}, @INC; + exec $^X . ' "' . $0 . '" ' . join( ' ', @{ $options->{argv} } ); }