[Catalyst-commits] r9193 -
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Wed Feb 4 15:03:41 GMT 2009
Author: rafl
Date: 2009-02-04 15:03:41 +0000 (Wed, 04 Feb 2009)
New Revision: 9193
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm
Log:
Properly report dynamic bind port for the development server.
Closes RT#38544.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm 2009-02-04 15:03:35 UTC (rev 9192)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm 2009-02-04 15:03:41 UTC (rev 9193)
@@ -183,7 +183,7 @@
my ( $self, $class, $port, $host, $options ) = @_;
$options ||= {};
-
+
$self->options($options);
if ($options->{background}) {
@@ -218,6 +218,8 @@
)
or die "Couldn't create daemon: $!";
+ $port = $daemon->sockport();
+
my $url = "http://$host";
$url .= ":$port" unless $port == 80;
@@ -287,10 +289,10 @@
}
$self->_handler( $class, $port, $method, $uri, $protocol );
-
+
if ( $self->_has_write_error ) {
close Remote;
-
+
if ( !defined $pid ) {
next LISTEN;
}
@@ -322,9 +324,9 @@
close Remote;
}
}
-
+
$daemon->close;
-
+
DEBUG && warn "Shutting down\n";
if ($restart) {
@@ -335,8 +337,8 @@
### 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;
-
+ $ENV{PERL5LIB} .= join $Config{path_sep}, @INC;
+
exec $^X, $0, @{ $options->{argv} };
}
More information about the Catalyst-commits
mailing list