From: Rafael Kitover Date: Wed, 2 Jul 2008 01:53:50 +0000 (+0000) Subject: Fix config parsing for WrapCGI X-Git-Tag: 0.030~63 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-WrapCGI.git;a=commitdiff_plain;h=0e06d183eac6c88daee2fdaa13b6a683ccb9a0c7 Fix config parsing for WrapCGI --- diff --git a/lib/Catalyst/Controller/CGIBin.pm b/lib/Catalyst/Controller/CGIBin.pm index a73be05..b2eaab0 100644 --- a/lib/Catalyst/Controller/CGIBin.pm +++ b/lib/Catalyst/Controller/CGIBin.pm @@ -96,7 +96,7 @@ sub register_actions { undef $@; } - $app->log->info("Registering root/cgi_bin/$file as a $type CGI.") + $app->log->info("Registering root/cgi-bin/$file as a $type CGI.") if $app->debug; my $action_name = $self->cgi_action($file); diff --git a/lib/Catalyst/Controller/WrapCGI.pm b/lib/Catalyst/Controller/WrapCGI.pm index 39657e7..a4cd5de 100644 --- a/lib/Catalyst/Controller/WrapCGI.pm +++ b/lib/Catalyst/Controller/WrapCGI.pm @@ -146,7 +146,11 @@ sub wrap_cgi { my @env; - for (@{ $self->{CGI}{pass_env} }) { + my $pass_env = $self->{CGI}{pass_env}; + $pass_env = [] if not defined $pass_env; + $pass_env = [ $pass_env ] unless ref $pass_env; + + for (@$pass_env) { if (m!^/(.*)/\z!) { my $re = qr/$1/; push @env, grep /$re/, keys %ENV;