Store the script options in the engine.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Server.pm
index 1f4f80e..4e87191 100644 (file)
@@ -260,13 +260,13 @@ sub _plack_loader_args {
     );
 }
 
-sub _application_args {
-    my ($self) = shift;
+around _application_args => sub {
+    my ($orig, $self) = @_;
     return (
         $self->port,
         $self->host,
         {
-           argv => $self->ARGV,
+           %{ $self->$orig },
            map { $_ => $self->$_ } qw/
                 fork
                 keepalive
@@ -274,10 +274,12 @@ sub _application_args {
                 pidfile
                 keepalive
                 follow_symlinks
+                port
+                host
             /,
         },
     );
-}
+};
 
 __PACKAGE__->meta->make_immutable;
 1;