in reply to Re^2: Plack beer challenge
in thread Plack beer challenge

#!/home/mh­/perl514/b­in/plackup -s FCGI --listen /tmp/fcgi.­sock --da +emoniz­e --nproc 10

When the kernel honors a #! line, it only handles up to 1 argument. It certainly isn't portable to put so many options on your #! unless some non-standard method (not the Unix kernel) is doing the exec.

- tye        

Replies are listed 'Best First'.
Re^4: Plack beer challenge (#! args)
by morgon (Priest) on Sep 29, 2011 at 14:54 UTC
    Fair enough.

    I was only trying what I had gathered from a previous posting.

    The main question remains: How is it done properly?

      If what tye is saying has merit, since plackup is all of 9 lines, you could use

      #!/home/mh/perl514/bin/perl -- use strict; use warnings; use Plack::Runner; my $app = sub { return [ 200, [ "Content-Type" => "text/plain" ], ["hi"] ]; }; my $runner = Plack::Runner->new; $runner->parse_options( qw{ -s FCGI --listen / tmp /fcgi.sock --daemonize --nproc 10 }); $runner->run($app); __END__
        Thanks for your post.

        I have tried your script, as before it works stand-alone, however when run from apache I get an internal server error.

        The error-log says "Connection reset by peer: mod_fcgid: error reading data from FastCGI server" and "Premature end of script headers: app.psgi".

        Anyone with more ideas?