From: Rafael Kitover Date: Sun, 3 May 2009 04:34:45 +0000 (+0000) Subject: C::C::WrapCGI - add note about nph scripts not working (caelum) X-Git-Tag: 0.030~30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-WrapCGI.git;a=commitdiff_plain;h=c4ef0be57fab386faacd7021d3e419a83ff7b797 C::C::WrapCGI - add note about nph scripts not working (caelum) --- diff --git a/Changes b/Changes index 8ff86fd..86bb3ae 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Catalyst-Controller-WrapCGI +0.0035 2009-05-03 04:33:27 + - add a note about nph cgis not working (caelum) + 0.0034 2009-04-30 16:38:00 - remove all CGI specific env vars by default (caelum) diff --git a/Makefile.PL b/Makefile.PL index f232569..86d6de7 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,22 +3,12 @@ use inc::Module::Install; name 'Catalyst-Controller-WrapCGI'; all_from 'lib/Catalyst/Controller/WrapCGI.pm'; author 'Matt S. Trout '; -include 'Module::AutoInstall'; requires 'Catalyst' => '5.80002'; -requires 'parent'; -requires 'Task::Weaken'; requires 'HTTP::Request::AsCGI' => '0.8';; -requires 'URI'; requires 'File::Find::Rule'; requires 'List::MoreUtils'; requires 'File::Slurp'; -requires 'namespace::clean'; - -if($] < 5.009_005) { - requires 'Class::C3::XS' => '0.08'; - requires 'Class::C3' => '0.20'; -} test_requires 'Catalyst::Plugin::Static::Simple'; diff --git a/lib/Catalyst/Controller/WrapCGI.pm b/lib/Catalyst/Controller/WrapCGI.pm index 2cdab0b..7ca93f6 100644 --- a/lib/Catalyst/Controller/WrapCGI.pm +++ b/lib/Catalyst/Controller/WrapCGI.pm @@ -20,11 +20,11 @@ Catalyst::Controller::WrapCGI - Run CGIs in Catalyst =head1 VERSION -Version 0.0034 +Version 0.0035 =cut -our $VERSION = '0.0034'; +our $VERSION = '0.0035'; =head1 SYNOPSIS @@ -52,7 +52,7 @@ In your .conf, configure which environment variables to pass: pass_env PERL5LIB pass_env PATH pass_env /^MYAPP_/ - kill_env MOD_PERL + kill_env MYAPP_BAD @@ -210,7 +210,8 @@ sub wrap_cgi { ($username ? (REMOTE_USER => $username) : ()), %$filtered_env, PATH_INFO => $path_info, - FILEPATH_INFO => '/'.$c->action.$path_info, # eww +# eww, this is likely broken: + FILEPATH_INFO => '/'.$c->action.$path_info, SCRIPT_NAME => $c->uri_for($c->action)->path ); @@ -313,6 +314,25 @@ sub _filtered_env { __PACKAGE__->meta->make_immutable; +=head1 DIRECT SOCKET/NPH SCRIPTS + +This currently won't work: + + #!/usr/bin/perl + + use CGI ':standard'; + + $| = 1; + + print header; + + for (0..1000) { + print $_, br, "\n"; + } + +because the coderef is executed synchronously with C pointing to a temp +file. + =head1 ACKNOWLEDGEMENTS Original development sponsored by L