From: Florian Ragwitz Date: Thu, 14 Jan 2010 05:11:09 +0000 (+0000) Subject: Fix the fcgi script tests. X-Git-Tag: 5.89000~41 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=6640e1668543203e3347be8430ff8a80d425c763 Fix the fcgi script tests. --- diff --git a/Makefile.PL b/Makefile.PL index d3bcff3..828c2ab 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -21,6 +21,7 @@ requires 'namespace::clean' => '0.12'; requires 'B::Hooks::EndOfScope' => '0.08'; requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903'; requires 'Class::MOP' => '0.95'; +requires 'Data::OptList'; requires 'Moose' => '0.93'; requires 'MooseX::MethodAttributes::Inheritable' => '0.19'; requires 'MooseX::Role::WithOverloading' => '0.05'; diff --git a/lib/Catalyst/Script/FastCGI.pm b/lib/Catalyst/Script/FastCGI.pm index c806439..47f1e1b 100644 --- a/lib/Catalyst/Script/FastCGI.pm +++ b/lib/Catalyst/Script/FastCGI.pm @@ -1,6 +1,7 @@ package Catalyst::Script::FastCGI; use Moose; use MooseX::Types::Moose qw/Str Bool Int/; +use Data::OptList; use namespace::autoclean; sub _plack_engine_name { 'FCGI' } @@ -58,8 +59,11 @@ has nproc => ( sub _plack_loader_args { my ($self) = shift; return ( - map { $_ => $self->$_() } - qw/pidfile listen manager nproc detach keep_stderr/ + map { $_->[0] => $self->${ \($_->[1] ? $_->[1]->[0] : $_->[0]) } } + Data::OptList::mkopt([ + qw/pidfile listen manager nproc keep_stderr/, + detach => [ 'daemon'], + ]) ); }