[Catalyst] Authenticating a "Normal CGI Script" Inside a Catalyst Application

hkclark at gmail.com hkclark at gmail.com
Sat Jan 28 02:09:11 CET 2006


Hi Yuval,

Thank you very much for the suggestions.  I have been taking a look at
HTTP::Request::AsCGI and have a few questions:

1) It seems the whole idea of HTTP::Request::AsCGI is to essentially grab
what CGI.pm would normally send to stdout and capture it in a string
variable -- is that correct?  I assume the idea with Catalyst would be to
assign this captured output to something like $context->response->body so
that it goes back to the user.  Or am I totally missing the boat here?

2) This could be a really dumb question, but when I look at the "Synopsis"
example in:
http://search.cpan.org/~chansen/HTTP-Request-AsCGI-0.5/lib/HTTP/Request/AsCGI.pm
I'm confused by what a GET request to http://www.host.com has to do with
capturing the output of the CGI.pm header, start_html, h1, and end_html call
a few lines later.  I see that $request is used in the AsCGI constructor,
but it seems totally unnecessary and unrelated.  What am I missing here?

Thanks!

On 1/26/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
>
> You can either wrap the CGI in your Catalyst app, possibly with
> HTTP::Request::AsCGI. That would allow you to wrap it with
> authentication stuff.
>
> The performance hit will probably be negliable, given that it's an
> old style CGI (i'm assuming).
>
> If pressured I might be able to spit out code samples ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060127/5fc141ad/attachment.htm


More information about the Catalyst mailing list