Catalyst-Controller-WrapCGI

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


    Runs $coderef in a CGI environment using HTTP::Request::AsCGI, returns
    an HTTP::Response.

    The CGI environment is set up based on $c.

    The environment variables to pass on are taken from the configuration
    for your Controller, see "SYNOPSIS" for an example. If you don't supply
    a list of environment variables to pass, the whole of %ENV is used
    (with exceptions listed in "FILTERED ENVIRONMENT".

    Used by "cgi_to_response", which is probably what you want to use as
    well.

FILTERED ENVIRONMENT

    If you don't use the "pass_env" option to restrict which environment
    variables are passed in, the default is to pass the whole of %ENV
    except the variables listed below.

      MOD_PERL
      SERVER_SOFTWARE
      SERVER_NAME
      GATEWAY_INTERFACE
      SERVER_PROTOCOL
      SERVER_PORT
      REQUEST_METHOD
      PATH_INFO
      PATH_TRANSLATED
      SCRIPT_NAME
      QUERY_STRING
      REMOTE_HOST
      REMOTE_ADDR
      AUTH_TYPE
      REMOTE_USER
      REMOTE_IDENT
      CONTENT_TYPE
      CONTENT_LENGTH
      HTTP_ACCEPT
      HTTP_USER_AGENT

    %ENV can be further trimmed using "kill_env".

DIRECT SOCKET/NPH SCRIPTS

    This currently won't work:

        #!/usr/bin/perl
    
        use CGI ':standard';
    
        $| = 1;
    
        print header;
    
        for (0..1000) {
            print $_, br, "\n";
            sleep 1;
        }

    because the coderef is executed synchronously with STDOUT pointing to a
    temp file.

ACKNOWLEDGEMENTS

    Original development sponsored by http://www.altinity.com/

SEE ALSO

    Catalyst::Controller::CGIBin, CatalystX::GlobalContext,
    Catalyst::Controller, CGI, Catalyst

BUGS

    Please report any bugs or feature requests to
    bug-catalyst-controller-wrapcgi at rt.cpan.org, or through the web
    interface at
    http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Controller-WrapCGI.
    I will be notified, and then you'll automatically be notified of
    progress on your bug as I make changes.

AUTHOR

    Matt S. Trout <mst at shadowcat.co.uk>

CONTRIBUTORS

    Caelum: Rafael Kitover <rkitover@cpan.org>

    confound: Hans Dieter Pearcey <hdp@cpan.org>

    rbuels: Robert Buels <rbuels@gmail.com>

    Some code stolen from Tatsuhiko Miyagawa's CGI::Compile.

COPYRIGHT & LICENSE

    Copyright (c) 2008-2015 "AUTHOR" in Catalyst::Controller::WrapCGI and
    "CONTRIBUTORS" in Catalyst::Controller::WrapCGI.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.



( run in 0.846 second using v1.01-cache-2.11-cpan-39bf76dae61 )